Playing one .flv after another
Hi... I was wondering if there's a way to play an .flv after another .flv has finished playing, using this code:
Code:
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
theVideo.attachVideo(ns);
theVideo.attachAudio(ns);
var snd = new Sound("ns");
//To adjust the audio:
snd.setVolume(100);
ns.play("jamaican_office.flv");
rewindBtn.onRelease = function() {
ns.seek(0);
}
playBtn.onRelease = function() {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
duration = 30.0;
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loader.loadbar._width = amountLoaded * 176;
loader.scrub._x = ns.time / duration * 176;
}
var scrubInterval;
loader.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit,10);
this.startDrag(false,0,this._y,170,this._y);
}
loader.scrub.onRelease = function() {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag();
}
loader.scrub.onReleaseOutside =function() {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus,100);
this.stopDrag();
}
function scrubit () {
ns.seek(Math.floor((loader.scrub._x /170)* duration));
}
If anyone could help I would appreciate it! :smoov: