Server-Side Communication ActionScript > Application.onAppStart

 

Application.onAppStart

Availability

Flash Communication Server MX.

Usage

application.onAppStart = function (){
	// insert code here
};

Parameters

None.

Returns

Nothing.

Description

Event handler; invoked when the server first loads the application instance. You use this handler to initialize an application state. You can use application.onAppStart and application.onAppStop to initialize and clean up global variables in an application because each of these events is invoked only once during the lifetime of an application instance.

Example

The following example defines an anonymous function for the application.onAppStart event handler that sends a trace message:

application.onAppStart = function () {
	trace ("onAppStart called");
};