MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Spezifikationen Seite 339

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 369
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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.
Seitenansicht 338
1 2 ... 334 335 336 337 338 339 340 341 342 343 344 ... 368 369

Kommentare zu diesen Handbüchern

Keine Kommentare