Preloader for multiple external images
Hi,
I'm currently trying to solve this issue.
I'm creating a 360 turn by importing .png files into each movie clip. I wanted the preloader bar to increase in size as each one loads.
Once the preloader is completed on frame one, I have it go and stop on frame 2, but there is a blank screen for a view seconds. I think the images were still loading after the preloader was completed.
I have tried the fucntion getBytesTotal and getBytesLoaded, but did not work too well.
here is the sample of the code:
this.onEnterFrame =function()
{
preloader._alpha=100; //Preloader
done=0;
t=0;
for (i=0;i<24;i++)
{
this["CAR_BASE_"+(i+1)].loadMovie("img/car_"+(i+1)+".png");
completed=((i+1)/24)*100;
preloader._xscale=completed;
}
if(completed==100){
gotoAndStop(2);
preloader._alpha=0;
this.onEnterFrame=null;
}
}