User Guide

NetConnection class 111
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.
Example
The following example defines a function for the onStatus handler that outputs messages to
indicate whether the NetConnection was successful:
nc = new NetConnection();
nc.onStatus = function(info){
if (info.code == "NetConnection.Connect.Success") {
_root.gotoAndStop(2);
} else {
if (! nc.isConnected){
_root.gotoAndStop(1);
}
}
};
NetConnection.uri
Availability
Flash Communication Server MX 1.0.
Usage
myNetConnection.uri
Description
Property (read-only); A string indicating the URI that was passed by the
NetConnection.connect() method. This property is set to null before a call to
NetConnection.connect() or after NetConnection.close is called.