home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / DTM2001.swf / scripts / DefineSprite_21 / frame_2 / DoAction.as
Encoding:
Text File  |  2001-07-07  |  619 b   |  28 lines

  1. bytes_loaded = _root.getBytesLoaded();
  2. bytes_total = _root.getBytesTotal();
  3. zeit = getTimer() / 1000 - zeit_1;
  4. bps = bytes_loaded / zeit;
  5. bytes_left = bytes_total - bytes_loaded;
  6. restsek = Math.ceil(bytes_left / bps);
  7. min = Math.floor(restsek / 60);
  8. if(min >= 1)
  9. {
  10.    restsek -= Math.floor(min * 60);
  11.    if(restsek < 10)
  12.    {
  13.       restsek = "0" add restsek;
  14.    }
  15. }
  16. else
  17. {
  18.    min = "0";
  19.    if(restsek < 10)
  20.    {
  21.       restsek = "0" add restsek;
  22.    }
  23. }
  24. restzeit = min add ":" add restsek;
  25. bit_rate = int(bps) add "bps";
  26. prozent = bytes_loaded / bytes_total * 100;
  27. _root.bar._xscale = prozent;
  28.