Posted By

sebastianassaf on 09/01/08


Tagged

preloader as3


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Paco
THEPWN3R


Oman3D - Simple Preloader


 / Published in: ActionScript 3
 

URL: http://www.oman3d.com/tutorials/flash/basicwebsite/

  1. stop();
  2.  
  3. this.addEventListener(Event.ENTER_FRAME, loading);
  4.  
  5. function loading(e:Event):void {
  6.  
  7. var total:Number = this.stage.loaderInfo.bytesTotal;
  8. var loaded:Number = this.stage.loaderInfo.bytesLoaded;
  9.  
  10. if (total == loaded) {
  11.  
  12. play();
  13. this.removeEventListener(Event.ENTER_FRAME, loading);
  14.  
  15. }
  16.  
  17. }

Report this snippet  

You need to login to post a comment.