home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Corrida / amazingrace.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2006-06-13  |  1.1 KB  |  41 lines

  1. function preLoading()
  2. {
  3.    loadedSuccess = true;
  4.    clearInterval(_iTimes);
  5.    _iTimes = null;
  6. }
  7. Stage.scaleMode = "exactFit";
  8. Stage.align = "TL";
  9. System.security.allowDomain("*");
  10. Stage.showMenu = false;
  11. _iTimes = null;
  12. _iTimes = setInterval(preLoading,8000);
  13. protocol = _url.substr(0,_url.indexOf(":"));
  14. hacked = false;
  15. this.onEnterFrame = function()
  16. {
  17.    if(this.getBytesLoaded() == this.getBytesTotal() && loadedSuccess == true)
  18.    {
  19.       _root.preloader_mc._visible = false;
  20.       if(hacked == false)
  21.       {
  22.          gotoAndStop("init");
  23.       }
  24.       delete this.onEnterFrame;
  25.    }
  26.    else if(this.getBytesLoaded() == this.getBytesTotal())
  27.    {
  28.       _root.preloader_mc.caption_txt.text = "Starting...";
  29.       _root.preloader_mc.caption2_txt.text = "Starting...";
  30.    }
  31.    else
  32.    {
  33.       var _loc3_ = Math.round(this.getBytesLoaded() * 100 / this.getBytesTotal());
  34.       _root.preloader_mc.bar_mc._xscale = _loc3_;
  35.       _root.preloader_mc.caption_txt.text = _loc3_ + "%";
  36.       _root.preloader_mc.caption2_txt.text = _loc3_ + "%";
  37.    }
  38. };
  39. _quality = "BEST";
  40. stop();
  41.