Client-Side Communication ActionScript > NetConnection.onStatus |
![]() ![]() ![]() |
NetConnection.onStatus
Availability
![]() |
Flash Player 6. |
![]() |
Flash Communication Server MX. |
Usage
myConnection
.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.
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.
Example
The following example writes data about the connection to a log file.
reconnection.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.description + "\n"; }
See also
NetConnection.call
, NetConnection.close
, NetConnection.connect
![]() ![]() ![]() |