MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 32

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 31
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
29
description A string that allows you to provide more information when a connection is redirected.
errObj An object of any type that is sent to the client, explaining the reason for rejection. The errObj object is
available in client-side scripts as the
application property of the information object that is passed to the
NetConnection.onStatus() call when the connection is rejected.
Example
In the following example, the client is rejected and sent an error message. This is the server-side code:
application.onConnect = function(client){
// Insert code here.
var error = new Object();error.message = "Too many connections";
application.rejectConnection(client, error);
};
This is the client-side code:
clientConn.onStatus = function (info){
if (info.code == "NetConnection.Connect.Rejected"){
trace(info.application.message);
// Sends the message
// "Too many connections" to the Output panel
// on the client side.
}
};
application.server
application.server
Read-only; the platform and version of the server.
Availability
Flash Communication Server 1
Example
The following example checks the
server property against a string before executing the code in the if statement:
if (application.server == "Flash Media Server-Windows/1.0"){
// Insert code here.
}
application.shutdown()
application.shutdown()
Unloads the application instance. If the application is running in vhost or application-level scope, only the appli-
cation instance is unloaded, but the core process remains running. If the application is running in instance scope,
the application instance is unloaded and the core process terminates. This process is done asynchronously; the
instance is unloaded when the unload sequence begins, not when the
shutdown() call returns.
After
shutdown() is called, application.onAppStop() is called, connected clients are disconnected, and
application.onDisconnect() is called for each client. Calls made after calling shutdown() may not be executed.
Availability
Flash Media Server 2
Vedere la pagina 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 154 155

Commenti su questo manuale

Nessun commento