# Sequencial Cliploader

**URL:** <https://forum.kirupa.com/t/sequencial-cliploader/220492>\
**Category:** flash\
**Created:** [March 26, 2007, 9:16pm UTC](https://forum.kirupa.com/t/sequencial-cliploader/220492 "2007-03-26T21:16:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jt\_01](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@Jt\_01](https://forum.kirupa.com/u/Jt_01)\
**Post date:** [March 26, 2007, 9:16pm UTC](https://forum.kirupa.com/t/sequencial-cliploader/220492/1 "2007-03-26T21:16:11Z")

</div>

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?

```auto

//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);
    }

}

```
