Hi,

Flash CS5.5 , using AS2.

I have a problem with createEmptyMovieClip(s)

I have a small image gallery and i wish to create loader bars for each thumbnail

I can do it for an image loading individually no problem and i can get one to load when it comes to multiple createEmptyMovieClips, can anyone advise ?

I get my images from a php array and not an xml file, i have tried for loop and recalling the function after the first load complete, no luck.

obviously i wish to load one thumb befoe the next and so on.

Code -

clipWidth = "80";
clipHeight = "40";
hspace = "90";
vspace = "50";

function create() {

for (count=0; count<TotalImages; count++) {
myMovieClip.createEmptyMovieClip ("thumb"+count, count);
loadMovie(ImageList[count],myMovieClip.thumb);
//myMovieClip._x = count * hspace;
//myMovieClip._y = count * vspace;

onEnterFrame = function() {
il = myMovieClip.thumb.getBytesLoaded();
it = myMovieClip.thumb.getBytesTotal();
percentage = int(il/it*100);
myMovieClip.bar._alpha = 100;
myMovieClip.bar.gotoAndStop(percentage);
if (percentage==100) {

new mx.transitions.Tween(myMovieClip.thumb, "_alpha", mx.transitions.easing.Strong.easeInOut, 0, 100, 1.5, true);
//myMovieClip.thumb._x= (count%5) * hspace;
//myMovieClip.thumb._y = Math.floor(count/5) * vspace;
myMovieClip.thumb._width = clipWidth;
myMovieClip.thumb._height = clipHeight;
myMovieClip.thumb.smoothing = true;
myMovieClip.thumb.forceSmoothing = true;
percentage = "0";
myMovieClip.bar._alpha = 0;
myMovieClip.bar.gotoAndStop(1);
myMovieClip.thumb.onRelease = function() {
do my things
}
delete onEnterFrame;
//doNextImage();
}
}
}
}

working (or non working example) - http://www.fgps.com/keith

under gallery

thanks in advance

Fruitbeard