Search code examples
actionscript-3preloaderloaderinfo

ProgressEvent.PROGRESS not firing in AS3


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?


Solution

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