NetConnection.onStatus

Availability

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.

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_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.description + "\n";
}

See also

NetConnection.call(), NetConnection.close(), NetConnection.connect()


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000574.html