NetConnection class
75
NetConnection.onStatus
Availability
■
Flash Player 6.
■
Flash Communication Server MX 1.0.
Usage
my_nc
.onStatus = function(
infoObject
) {
// your code here
}
Parameters
infoObject
A parameter defined according to the status message. For more information
about this parameter, see
“NetConnection information objects” on page 152
.
Returns
Nothing.
Description
Event handler; invoked when a status change or error is posted for the NetConnection object.
If you want to respond to this event handler, you must create a function to process the
information object sent by the server. For more information, see
“Client-Side Information
Objects” on page 149
.
Example
The following example writes data about the connection to a log file.
reconnection_nc.onStatus = function(info){
_root.log += "Recording stream status.\n";
_root.log += "Event: " + info.code + "\n";
_root.log += "Type: " + info.level + "\n";
_root.log += "Message:" + info.descr "\n";
}
See also
NetConnection.call()
,
NetConnection.close()
,
NetConnection.connect()
NetConnection.uri
Availability
■
Flash Player 6.
■
Flash Communication Server MX 1.0.