Posted By

dx0ne on 02/22/09


Tagged


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

loric
KDR
edsonpavoni
mrclsnkpl
tspitzr


AS3: Preloader


 / Published in: ActionScript 3
 

  1. import flash.events.*;
  2. import flash.display.LoaderInfo;
  3.  
  4. this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
  5. this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
  6.  
  7. function onProgress(event:ProgressEvent):void {
  8. var p:Number=event.bytesLoaded/event.bytesTotal;
  9. //bar.scaleX=p;
  10. }
  11. function onComplete(e:Event)
  12. {
  13. //play();
  14. }

Report this snippet  

You need to login to post a comment.