home *** CD-ROM | disk | FTP | other *** search
/ E3 2003 Press Pack / Image.iso / n-gage.swf / scripts / frame_6 / DoAction.as
Text File  |  2003-05-08  |  558b  |  26 lines

  1. var framestoload = _totalframes;
  2. bytesloaded = getbytesloaded();
  3. bytestotal = getbytestotal();
  4. if(_framesloaded == framestoload)
  5. {
  6.    preloadBar._visible = false;
  7.    boundingBox._visible = false;
  8.    gotoAndPlay(9);
  9. }
  10. else
  11. {
  12.    percent = bytesloaded / bytestotal;
  13.    preloadBar._xscale = math.round(percent * 100);
  14.    percentOutput = math.round(percent * 100) + "%";
  15.    if(0.99 < percent)
  16.    {
  17.       preloadBar._visible = false;
  18.       boundingBox._visible = false;
  19.       gotoAndPlay(9);
  20.    }
  21.    else
  22.    {
  23.       gotoAndPlay(5);
  24.    }
  25. }
  26.