Jan
Jan

Reputation: 43169

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?

Upvotes: 0

Views: 2573

Answers (1)

BadFeelingAboutThis
BadFeelingAboutThis

Reputation: 14406

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

Upvotes: 1

Related Questions