home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / robot_warrior.swf / scripts / DefineSprite_115 / frame_2 / DoAction.as
Encoding:
Text File  |  2006-09-05  |  707 b   |  27 lines

  1. loadedSize = _root.getBytesLoaded();
  2. totalSize = _root.getBytesTotal();
  3. time = getTimer() - time0;
  4. if(time >= 1000)
  5. {
  6.    time0 = getTimer();
  7.    speed = Math.floor((loadedSize - loadSize0) / 1000);
  8.    loadSize0 = loadedSize;
  9.    forTime = Math.floor((totalSize - loadedSize) / 1000 / speed);
  10. }
  11. if(loadedSize >= totalSize)
  12. {
  13.    downloadParcent = 100;
  14.    this.display.sankaku.sizeChange(100);
  15.    this.bar.sizeChange(100);
  16.    this.anyBar.anyBarChange(100);
  17. }
  18. else
  19. {
  20.    parcent = loadedSize / totalSize * 100;
  21.    this.display.sankaku.sizeChange(parcent);
  22.    this.bar.sizeChange(parcent);
  23.    downloadParcent = Math.round(parcent);
  24.    this.anyBar.anyBarChange(parcent);
  25.    _root.stop();
  26. }
  27.