MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Manuel d'utilisateur Page 17

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 80
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 16
Server-Side Communication ActionScript 17
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 Appendix,
“Server-Side Information Objects,” on page 77.
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.
Description
Event handler; invoked when the application is about to be unloaded by the server. You can
define a function that executes when the event handler is invoked. If the function returns
true,
the application unloads. If the function returns
false, the application doesnt unload. If you
dont define a function for this event handler, or if the return value is not a Boolean value, the
application is unloaded when the event is invoked.
The Flash Communication 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 Administration Console or the Server Management ActionScript API to unload a
Flash Communication 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
This 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...
// insert code here
}
application.onAppStop = onMyApplicationEnd;
Vue de la page 16
1 2 ... 12 13 14 15 16 17 18 19 20 21 22 ... 79 80

Commentaires sur ces manuels

Pas de commentaire