ProgressEvent.PROGRESS not firing in AS3

此生再无相见时 提交于 2019-12-25 04:17:22

问题


I trying to create a preloader for a game in Flash CS6. I've already slowed down the download speed to 1,2 kb but the ProgressEvent.PROGRESS is never fired. This is what I have:

import flash.events.Event;
import flash.events.ProgressEvent;
stop();

loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressMade);

function onProgressMade( progressEvent:ProgressEvent ):void {
trace( loaderInfo.bytesLoaded, loaderInfo.bytesTotal );
}

The stage stays blank but onProgressMade gets never called. Can someone point me in the right direction, please?


回答1:


Try following this tutorial: http://stephenscholtz.com/201110/single-movie-flash-preloading-as3



来源:https://stackoverflow.com/questions/12063238/progressevent-progress-not-firing-in-as3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!