views:

23

answers:

1

I have a .fla that has a preloader on frame one and the rest of the file on frames 2 thru 55. The preloader code is the one that comes in Flash cs5's sample files. there is a movie clip with the instance name lbar and text with the name lpc. here is the code

stop();   


import flash.display.*;

this.stop



this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);

function PL_LOADING(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;

lbar.scaleX=pcent/100;

lpc.text=int(pcent)+"%";
lpc.z = pcent/100

if(pcent==100){
this.gotoAndPlay(2);
    }
}

It works fine the first time people are on my site but when the page is refreshed or is gone back to sometimes the loader bar is just stuck and doesnt load.

Any help is greatly appreciated! Thanks

A: 

The problem was in firefox. It now works because of some javascript coding

Ben Rosenbaum