Slight preloader glitch

hi there, first of all I’d like to say once again, thanks to everyone who has taken the time to look through my other posts and provide some help, it has really been appreciated and has made a world of difference to my general flash understanding.

I’ve made a smooth preloader for all of the individual movie elements of my site, but there’s a slight problem with it that I thought somebody here may know the answer to. Before the bar starts to fill up, the full bar flashes on the screen for a split second, it’s not a big deal, but I wondered if anyone knew why. Here’s my code:

this.stop();

var percLoaded:Number=0;var
newPercLoaded:Number;
onEnterFrame = preload;

function preload():Void {
newPercLoaded = Math.floor(this.getBytesLoaded()/this.getBytesTotal()100);
loadBar._xscale=percLoaded=percLoaded+(newPercLoaded-percLoaded)
.2;
if(percLoaded>99.9&&newPercLoaded==100){
stop();
this.nextFrame();
delete this.onEnterFrame;
}
}

If anyone has any ideas, I’m all ears.

James