carayo
09-23-2004, 10:12 AM
I´m pretty new at this and could really use some help
I want to trigger a new video "video2.flv" when the first one finishes, and I´m sooo close. The onStatus handler (it´s a handler...right?) works and traces "finished" when the first video reaches the end. Then I try to play the second video and it completely freezes. I´m using netStream.play("videos/video2.flv"); which makes sense to me, but it´s obviously not right...
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream(netConn);
Smartvideo.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("videos/video1.flv");
netStream.onStatus = function (vInfo) {
trace(vInfo.code)
if (vInfo.code == "NetStream.Play.Stop") {
trace("finished")
netStream.play("videos/video2.flv");
}
}
stop();
I want to trigger a new video "video2.flv" when the first one finishes, and I´m sooo close. The onStatus handler (it´s a handler...right?) works and traces "finished" when the first video reaches the end. Then I try to play the second video and it completely freezes. I´m using netStream.play("videos/video2.flv"); which makes sense to me, but it´s obviously not right...
var netConn:NetConnection = new NetConnection();
netConn.connect(null);
var netStream:NetStream = new NetStream(netConn);
Smartvideo.attachVideo(netStream);
netStream.setBufferTime(5);
netStream.play("videos/video1.flv");
netStream.onStatus = function (vInfo) {
trace(vInfo.code)
if (vInfo.code == "NetStream.Play.Stop") {
trace("finished")
netStream.play("videos/video2.flv");
}
}
stop();