NetStream class
97
In the following example, suppose you have a playlist of three recorded streams.
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://localhost/appName/appInstance");
// Create a NetStream for playing back in a Video object named my_video.
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
// to play record1
my_ns.play("record1", 0, -1, false);
// to play record2
my_ns.play("record2", 0, -1, false);
// to play record3
my_ns.play("record3", 0, -1, false);
// You click a button to pause while record2 is playing.
my_ns.pause();
// Later, you want to resume the play.
my_ns.pause();
// Later, you want to start a new playlist.
// to play record4
my_ns.play("record4", 0, -1, true);
// to play record5
my_ns.play("record5", 0, -1, false);
// to play record6
my_ns.play("record6", 0, -1, false);
See also
NetStream.close()
,
NetStream.play()