The following example creates a debug connection:
nc_admin = new NetConnection();
nc_admin.connect("rtmp://tc.foo.com/myApp/myConn?_fcs_debugreq_=1234");
nc_admin.call("approveDebugSession", null, "myApp/myConn", 1234);
NetConnection.isConnected
Availability
Flash Communication Server MX 1.0.
Usage
myNetConnection.isConnected
Description
Property (read-only); a Boolean value that indicates whether a connection has been made. It is
set to
if there is a connection to the server. It's a good idea to check this property value in
true
an
callback function. This property is always
onStatus
application servers.
Example
The following example uses
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 1.0.
Usage
myNetConnection.onStatus = function(infoObject) {}
Parameters
An information object. For more information about this parameter, see
infoObject
"Server-Side Information Objects" on page
110
Server-Side ActionScript Language Reference
NetConnection.isConnected
229.
for AMF connections to
true
in an
definition to
onStatus
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?