Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > NetStream class > NetStream.onStatus | |||
public onStatus = function(infoObject:Object) {}
infoObject A parameter defined according to the status or error message. For more information about this parameter, see NetStream information objects.
Nothing.
Event handler; invoked every time a status change or error is posted for the NetStream 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.
In addition to this NetStream.onStatus handler, Flash also provides a super function called System.onStatus. If NetStream.onStatus is invoked for a particular object and there is no function assigned to respond to it, Flash processes a function assigned to System.onStatus if it exists.
The following example displays data about the stream in the Output panel:
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("video1.flv");
stream_ns.onStatus = function(infoObject:Object) {
trace("NetStream.onStatus called: ("+getTimer()+" ms)");
for (var prop in infoObject) {
trace("\t"+prop+":\t"+infoObject[prop]);
}
trace("");
};
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fms/2/docs/00000586.html
Comments
MotionMaker said on Dec 12, 2006 at 11:36 AM : breez11 said on Aug 15, 2007 at 10:43 AM :