# Dynamic Preload Problem

**URL:** <https://forum.kirupa.com/t/dynamic-preload-problem/308746>\
**Category:** flash\
**Created:** [April 29, 2010, 8:40am UTC](https://forum.kirupa.com/t/dynamic-preload-problem/308746 "2010-04-29T08:40:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LS05](https://avatars.discourse-cdn.com/v4/letter/l/e19b73/32.png) [@LS05](https://forum.kirupa.com/u/LS05)\
**Post date:** [April 29, 2010, 8:40am UTC](https://forum.kirupa.com/t/dynamic-preload-problem/308746/1 "2010-04-29T08:40:43Z")

</div>

Hi guys,  
I’ve a preload bar in my movieclip that i add on the stage for every thumb.  
With this code only the last preload bar does the preload…the others don’t do anything…Here the code:

```auto
function testMovieClip():void{
    for (var i:Number = 0; i < my_total; i++){
        var thumb_url = my_images*.@ANTEPRIME;
        var thumb_loader:Loader = new Loader();
        thumb_loader.load(new URLRequest(thumb_url));
        MainMovie = new thumbnailholder();
        MainMovie.x = (MainMovie.width + 70)*x_counter;
        MainMovie.y = (MainMovie.height + 70)*y_counter;
        if (x_counter+1 < columns){
            x_counter++;
        } else {
            x_counter = 0;
            y_counter++;
        }
        mainCont.addChild(MainMovie);
        MainMovie.imgMain.addChild(thumb_loader);
    }
    thumb_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, thumbProg);
}

function thumbProg(e:ProgressEvent)
{
    var percnt:Number = e.bytesLoaded/e.bytesTotal;
    MainMovie.prelBar.width = Math.ceil(percnt*100);
}

```

I also try to insert the ProgressEvent.PROGRESS listener into the FLASH structure…but i’ve the same result…
