Posted By

adamcoulombe on 10/06/09


Tagged

actionscript flash simple movie preloader 2 movieclip loader clip


Versions (?)

Simple Preloader Setup for Actionscript 2


 / Published in: ActionScript
 

  1. this.onEnterFrame = function() {
  2. filesize = myMovieClip.getBytesTotal();
  3. loaded = myMovieClip.getBytesLoaded();
  4. preloader._visible = true;
  5. if (loaded != filesize) {
  6. percent = 100*loaded/filesize;
  7. preloader.preload_bar._xscale = percent;
  8. } else {
  9. preloader._visible = false;
  10. onMovieClipLoaded();
  11. delete this.onEnterFrame
  12. }
  13. };
  14.  
  15. onMovieClipLoaded = function(){
  16. trace("if you are reading this, the movieclip has been loaded");
  17. }

Report this snippet  

You need to login to post a comment.