MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifiche Pagina 105

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 369
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 104
About Flash Communication Server Applications 27
When the user runs your Flash SWF file and the SWF file connects to the server, the server loads
the application and creates the application instance if it isnt already running. The server accepts
the connection, creates a new Client object to represent the client application on the server, and
executes any server-side scripts that you have provided. The client also does its work, initiating
streams, sharing objects, and so on. The following sections describe this sequence of events in
more detail.
Note: Only the client application can initiate a communication session, and only the server can shut down an
application. Both the client and the server send and receive status messages, open and close streams, save and
share data, and end the network connection.
Application workflow
When the client connects to the server, the server calls
onAppStart if the application instance
isnt already running. Next, the server-side
onConnect method is invoked with a newly created
Client object. The logic in this method determines whether to accept or reject the connection.
Back on the client side, the
onStatus method is called to report whether the connection was
accepted or rejected. When the client closes the connection, the server-side
onDisconnect
method is called. When the application is unloaded,
onAppStop is invoked.
Connection flow
SERVER FLOW
onAppStart
new Client object onConnect
acceptConnection
onDisconnect
Application is
unloaded
onAppStop
CLIENT FLOW
connect
onStatus
close
Vedere la pagina 104
1 2 ... 100 101 102 103 104 105 106 107 108 109 110 ... 368 369

Commenti su questo manuale

Nessun commento