I'm busy building a AS2 flash site and all has gone well until I tried to build the preloader.
The problem is that the preloader progress bar runs, but finishes to soon. Then you end up looking at a static progress bar for about 10 seconds (depending on line speed), before it continues to the main movie. So I am guessing that the preloader is not loading the entire site as is represented by the progress bar, but loads the remainder of the site after the progress bar has completed. Hope this makes sense!
The script I'm using:
Code: Select all
stop();
mask_mc._width = 1;
this.onEnterFrame = function() :Void {
var loadedData:Number = this.getBytesLoaded();
var allData:Number = this.getBytesTotal();
var percent:Number = Math.round(loadedData/allData*100);
mask_mc._xscale = percent;
if (loadedData == allData) {
gotoAndPlay(3);
delete this.onEnterFrame;
}
};
So how do I get rid of the delay between the finish of the preloader and the main site playing.
Hope someone can help, I've been searching for a solution for a week now.
Thanks in advance!