
Server-Side Communication ActionScript 15
Example
The following example checks the name property against a specific string before it executes some
code:
if (application.name == "videomail/work"){
// insert code here
}
Application.onAppStart
Availability
Flash Communication Server MX.
Usage
application.onAppStart = function (info){
// 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.onAppStop 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");
};
Application.onAppStop
Availability
Flash Communication Server MX.
Usage
application.onAppStop = function (info){
// insert code here
};
Parameters
info An information object that explains why the application stopped running. See the
Appendix, “Server-Side Information Objects,” on page 67.
Returns
The value returned by the function you define, if any, or null. To refuse to unload the
application, return
false. To unload the application, return true or any non-false value.
Commenti su questo manuale