Guest

Untitled

By: a guest on Jan 28th, 2012  |  syntax: None  |  size: 0.51 KB  |  hits: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. onEnterFrame = function()
  2. {
  3.         myLoaded        = Math.round(getBytesLoaded());
  4.         myTotal         = Math.round(getBytesTotal());
  5.         myPercent       = Math.round(myLoaded/myTotal*100);
  6.        
  7.         preloader_mc.preloaderFill_mc._width = myPercent*100/100;
  8.         preloader_mc.percent_txt.text        = Math.floor(myPercent*100) + "%";
  9.         preloader_mc.ofBytes_txt.text        = myLoaded + "bytes";
  10.         preloader_mc.totalBytes_txt.text     = myTotal + "bytes";
  11.                
  12.         if (myLoaded == myTotal)
  13.         {
  14.                 delete onEnterFrame;
  15.                 gotoAndStop(2);
  16.         }
  17. };
  18.  
  19. stop();