0

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?

Jan
  • 42,290
  • 8
  • 54
  • 79
  • Do you load content from filesystem (they are loaded SYNCHRONOUS as far as I know)? – David Rettenbacher Aug 21 '12 at 21:39
  • 1
    As LondonDrugs said you should probably post more code, such as what you're loading, how, or where you're getting your LoaderInfo from. As far as I can see this code is correct so the problem must be elswhere. – puggsoy Aug 21 '12 at 21:55
  • Well I have three frames where all my assets are being loaded in the second frame. The first frame holds the code mentioned above. I get no error whatsoever. There is no more code than that in the first frame. – Jan Aug 22 '12 at 05:02
  • 1
    go to advanced actionscript3.0 settings -> Export class frames -> set it to 2. then try. – Benny Aug 22 '12 at 06:10
  • 1
    To see if it's loading at all, add an event listener for the Event.COMPLETE event. If not then there's a problem with your loading in general, maybe Jegan's solution works. – puggsoy Aug 22 '12 at 15:48

1 Answers1

1

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

BadFeelingAboutThis
  • 14,445
  • 2
  • 33
  • 40
  • There were images, that's why I chose this as the correct answer ;-)) – Jan Aug 23 '12 at 06:27
  • This one is very good as well: http://jeffkamerer.com/blog/2010/08/12/using-a-custom-preloader-loop-with-tlf-text/ – Jan Aug 23 '12 at 20:11