HI I have this code to load in clips, it works fine to load them all in at once but I can’t get it to work sequencially. Can anyone help me please?
//subimage is array variables
MovieClip.prototype.pre = function(subimage){
//ADD VARIABLES FROM ARRAY
subtotal2 = subimage.length
var imgNum = subtotal2;
var imgCur = 1;
var imgSelected = null;
for (isub2=0; isub2<subtotal2; isub2++) {
newclip = projects_mc.projects_holder.attachMovie("pictureholder","pictureholder"+isub2,(isub2+99))
newclip._x=newclip._width*isub2
trace(newclip)
loadImg(subimage[isub2],newclip.picture);
pictureholder._y=120
}}
//////////////////////
/////Declare variables
//////////////////////
var imgLoader = new MovieClipLoader(); //Initialize the loader class
imgLoader.onLoadProgress = function (where, loadedBytes, totalBytes){
where._parent.loadbar._width = (loadedBytes/totalBytes)*450;
}
imgLoader.onLoadComplete = function (where){
where._parent.loadbar._alpha=0
if(imgCur == 1){
eval(what)._alpha = 100;
imgSelected = what;
}
//Incriment imgCur for the next load, and start the process again
imgCur++;
loadImg();
}
/////////////////////
/////Loading Function
/////////////////////
loadImg = function(what, where){
if(imgCur <= imgNum){
imgLoader.loadClip(what,where);
}
}