MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spécifications Page 339

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 369
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 338
Server-Side Communication ActionScript 39
Usage
myNetConnection.isConnected
Description
Property (read-only); a Boolean value that indicates whether a connection has been made. It is set
to
true if there is a connection to the server. Its a good idea to check this property value in the
onStatus callback function. This property is always true for AMF connections to application
servers.
Example
This example uses NetConnection.isConnected inside an onStatus definition to check if a
connection has been made:
nc = new NetConnection();
nc.connect("rtmp://tc.foo.com/myApp");
nc.onStatus = function(infoObj){
if (info.code == "NetConnection.Connect.Success" && nc.isConnected){
trace("We are connected");
}
};
NetConnection.onStatus
Availability
Flash Communication Server MX.
Usage
myNetConnection.onStatus = function(infoObject) {
// Your code here
}
Parameters
infoObject An information object. For details about this parameter, see the Appendix,
“Server-Side Information Objects,” on page 67.
Returns
Nothing.
Description
Event handler; invoked every time the status of the NetConnection object changes. For example,
if the connection with the server is lost in an RTMP connection, the
NetConnection.isConnected property is set to false, and NetConnection.onStatus is
invoked with a status message of
NetConnection.Connect.closed. For AMF connections,
NetConnection.onStatus is used only to indicate a failed connection. Use this event handler to
check for connectivity.
Vue de la page 338
1 2 ... 334 335 336 337 338 339 340 341 342 343 344 ... 368 369

Commentaires sur ces manuels

Pas de commentaire