Oman3D - Simple Preloader


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.