Flash Pro 8 : AS2.

Hi,

I made a simple flash preloader.

AS2 script given below. On the stage is a HolderMc clip to receive the incoming swf and a TextBoxMc inside which is the dynamic text is kept. The dynamic text variable box is filled with _root.VL
PHP Code:
stop();
trace("------------------------");
HolderMc._visible=0;
//////////

//Preloader Block.
HolderMc.loadMovie("Imagery.swf",0);

this.onEnterFrame=function(){
MyLoaded=Math.round(HolderMc.getBytesLoaded());
MyTotal=Math.round(HolderMc.getBytesTotal());
MyPercent=(MyLoaded/MyTotal);
VL=Math.round(MyPercent*100)+"%";  trace(VL);
if (
VL==99){
    
delete this.onEnterFrame;
    
trace("OEF DELETED");
    
_root.TextBoxMc._visible=0;
    };
}; 
Never works correctly because of the simple fact that its always starting at 100% for a few frames as can be noted from the trace results. Because of this the onEnterFrame isnt getting killed. And the 100% stays on the screen.