0
在我的FLV文件的第一帧我有这样的预加载器代码:AS3预装载代码没有进展
//Stop Frame
stop();
//Create a listener to call the loading function as the movie loads
this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, loading);
//Runs when the loading progress has changed
function loading(event:ProgressEvent):void
{
//Determine the percent loaded from bytesLoaded and bytesTotal
var percent:Number = event.bytesLoaded/event.bytesTotal * 100;
//Display the percentage of the pre-loaded MovieClip
percentage_text.text = int(percent)+"%";
if(percent == 100){
gotoAndStop(2);
}
}
当我试图通过绝对路径"http://localhost/test/mainFLV.swf"
的运行从XAMPP服务器的SWF文件SWF不会超过0%。但是,当我将SWF嵌入到PHP脚本中并加载了PHP脚本时,SWF加载的内容,但它并未显示预加载器的进度。
任何帮助?
编辑
只是测试它在Firefox中,我也得到了预加载器处于62%的闪存它进入第二帧之前。但是,原始问题仍然存在于Chrome中。
嘿谢谢你的帮助。我这样做,它确实允许框架进展到第二帧。但是有没有办法减慢加载进度,以便预加载器能够显示%进度,因为它速度如此之快? – Human 2013-03-13 20:59:47
我编辑了答案。 – strah 2013-03-13 21:06:35