Actionscctript 3.0 预加载器加载一次,然后刷新页面时不会加载
我有一个 .fla,它在第一帧上有一个预加载器,而文件的其余部分在第 2 帧到第 55 帧上。预加载器代码是 Flash cs5 示例文件中的代码。有一个实例名为 lbar 的影片剪辑和名为 lpc 的文本。这是代码,
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);
}
}
当人们第一次访问我的网站时,它工作正常,但是当页面刷新或返回时,加载栏有时会卡住并且无法加载。
非常感谢任何帮助! 谢谢
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题出在火狐浏览器上。由于一些 JavaScript 编码,它现在可以工作了
The problem was in firefox. It now works because of some javascript coding