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:
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…