Packagecom.kongregate.as3.client.events
Classpublic class KongregateEvent
InheritanceKongregateEvent Inheritance flash.events.Event

The Kongregate component dispatches KongregateEvent objects whenever developer related API events occur, such as when services are available.



Public Methods
 MethodDefined by
  
KongregateEvent(type:String)
KongregateEvent
Public Constants
 ConstantDefined by
  COMPLETE : String = "component_api_available"
[static] Defines the value of the type property of a complete event object.
KongregateEvent
Constructor detail
KongregateEvent()constructor
public function KongregateEvent(type:String)

Parameters
type:String
Constant detail
COMPLETEconstant
public static const COMPLETE:String = "component_api_available"

Defines the value of the type property of a complete event object.

This event is fired when Kongregate services have finished loading into the component and are available for developer access.


Example
// Import the libraries
import com.kongregate.as3.client.KongregateAPI;
import com.kongregate.as3.client.events.KongregateEvent
var kongregate:KongregateAPI = new KongregateAPI();
this.addChild ( kongregate );
// Our custom method, which will be called when the services load
function servicesLoaded ( e:KongregateEvent ):void
{ trace ( "Kongregate services are now available" );
}
// Add the listener
kongregate.addEventListener ( KongregateEvent.COMPLETE, servicesLoaded );