110
Server-Side ActionScript Language Reference
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
true
if there is a connection to the server. It’s a good idea to check this property value in
an
onStatus
callback function. This property is always
true
for AMF connections to
application servers.
Example
The following example uses
NetConnection.isConnected
in 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 1.0.
Usage
myNetConnection
.onStatus = function(
infoObject
) {}
Parameters
infoObject
An information object. For more information about this parameter, see
“Server-Side Information Objects” on page 229
.
Содержание FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT...
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...