NetStream class
101
starting at the beginning, for up to 100 seconds*/
my_ns.play("record1", 0, 100, true);
Example 2:
/* To play and switch between live and recorded streams:
Suppose we have two live streams, live1 and live2,
and three recorded streams, record1, record2, and record3.
The play order is record1, live1, record2, live2, and record3.*/
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://localhost/appName/appInstance");
// Create a NetStream for playing.
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
// Play record1.
my_ns.play("record1", 0, -1, false);
/* Switch from record1 to live1. live1 will start to play after record1 is
done. */
my_ns.play("live1", -1, 5, false);
/* Switch from live1 to record2. record2 will start to play after live1
plays for 5 seconds.*/
my_ns.play("record2", 0, -1, false);
/* Interrupt the current play and play a segment in record1 again (we can
implement a seek by this). */
my_ns.play("record1", 1, 5, true);
In the following example, data messages in the recorded stream file log.flv are returned at the
intervals at which they were originally recorded.
var my_ns:NetStream = new NetStream(my_nc);
my_ns.play("log", 0, -1);
In the following example, data messages in the recorded stream file log.flv are returned all at
once, rather than at the intervals at which they were originally recorded.
var my_ns:NetStream = new NetStream(my_nc);
my_ns.play("log", 0, -1, 2);
See also
MovieClip.attachAudio()
,
NetStream.close()
,
NetStream.pause()
,
NetStream.publish()
Содержание 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...