User Guide
Application class 29
The Flash Media Server application passes an information object to the
application.onAppStop event. You can use server-side ActionScript to look at this
information object to decide what to do in the function you define. You could also define the
application.onAppStop event to notify users before shutdown.
If you use the management console or the Server Management ActionScript API to unload a
Flash Media Server application,
application.onAppStop is not invoked. Therefore you
cannot use the
application.onAppStop event, for example, to tell users that the application
is exiting.
Example
The following example defines a function to perform the shutdown operations on the
application. The function is then assigned to the event handler so that it executes when the
handler is invoked.
function onMyApplicationEnd(info){
// Do all the application-specific shutdown logic here.
}
application.onAppStop = onMyApplicationEnd;
Application.onConnect
Availability
Flash Communication Server MX 1.0.
Usage
application.onConnect = function (clientObj [, p1, ..., pN]){}
Parameters
clientObj A Client object. The client connecting to the application.
p1 ..., pN Optional parameters passed to the application.onConnect handler. These
parameters are passed from the client-side
NetConnection.connect handler when a client
connects to the application.