开发者

Actionscctript 3.0 preloader loads once then when the page is refreshed it doesnt load

开发者 https://www.devze.com 2023-01-22 10:33 出处:网络
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 inst

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:Prog开发者_Go百科ressEvent):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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消