Am having a spot of bother getting my head around how I would go to the next item in array once this condition has been meet?
onEnterFrame = function(){
if(loader.scrub._x >= loadbar_Width){
trace("ended");
changeMovie();
This var catches the current item on release.
var catch_var = this._name;
Here is the bulk of the code
function changeMovie()
{
Video_Stage.attachVideo(net_stream);
net_stream.play(movieSelection);
}
function videoLoadStatus()
{
loaderAmount = net_stream.bytesLoaded / net_stream.bytesTotal;
loader.loadbar._width = loaderAmount * loadbar_Width;
loader.scrub._x = net_stream.time / duration * loadbar_Width;
} var net_Connection = new NetConnection();
net_Connection.connect(null);
var movieSelection = "../flash files/assets/0b1.flv";
var net_stream = new NetStream(net_Connection);
onLoad = function ()
{
changeMovie();
};
rewindButton.onRelease = function ()
{
net_stream.seek(0);
};
playButton.onRelease = function ()
{
net_stream.pause();
};
var loadbar_Width = 270;
var loaderInterval = setInterval(videoLoadStatus, 100);
var loaderAmount;
var duration;
net_stream.onMetaData = function (obj)
{
duration = obj.duration;
};
onEnterFrame = function(){
if(loader.scrub._x >= loadbar_Width){
trace("ended");
changeMovie();
}else{
//trace("WAIT");
}
}
buttonArray = [Enter_me.b1, Enter_me.b2, Enter_me.b3, Enter_me.b4, Enter_me.b5, Enter_me.b6, Enter_me.b7, Enter_me.b8, Enter_me.b9, Enter_me.b10];
for (z=0; z<buttonArray.length; z++) {
buttonArray[z].onRollOver = function() {
if (this._currentframe == 1) {
this.gotoAndPlay(2);
} else {
this.play();
}
};
}
for (z=0; z<buttonArray.length; z++) {
buttonArray[z].onRollOut = buttonArray[z].onDragOut=function () {
this.gotoAndPlay(11);
};
}
for (z=0; z<buttonArray.length; z++) {
buttonArray[z].onRelease = function() {
Video_Stage._visible = true;
target_path._visible = false;
var catch_var = this._name;
trace("../flash files/assets/0"+catch_var+".flv is now playing");
movieSelection = "../flash files/assets/0"+catch_var+".flv";
changeMovie();
};
}
Enter_me.b1_flash.onRelease = function() {
loadMovie("0b1.swf", target_path);Video_Stage._visible = false;
}
The theory is that once the first movie has played the next shall load.
any suggestions on this one??