94
Client-Side ActionScript Language Reference
NetStream.onPlayStatus
Availability
■
Flash Player 6.
■
Flash Media Server 2.
Usage
public onPlayStatus = function(
infoObject
:Object) {}
Parameters
infoObject
An object containing an error or status message. For more information about
this parameter, see
“NetStream information objects” on page 153
.
Returns
Nothing.
Description
Event handler; invoked when a NetStream object has completely played a stream. The
information object gives extra information when a NetStream object has switched from one
stream to another stream in a playlist (
NetStream.Play.Switch
) or when a NetStream object
has played to the end (
NetStream.Play.Complete
). 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
Appendix A, “Client-Side Information Objects,” on page 149
.
Example
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"); stream_ns.onPlayStatus =
function(infoObject:Object) {
trace("NetStream.onPlayStatus called: ("+getTimer()+" ms)");
for (var prop in infoObject) {
trace("\t"+prop+":\t"+infoObject[prop]);
}
trace("");
};
Содержание FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER...
Страница 1: ...Client Side ActionScript Language Reference for Flash Media Server 2...
Страница 4: ...4 Contents...
Страница 148: ...148 Client Side ActionScript Language Reference...