home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / starisland.swf / scripts / DefineSprite_330_info / frame_1 / DoAction.as
Encoding:
Text File  |  2007-12-10  |  570 b   |  25 lines

  1. function StopTimer()
  2. {
  3.    delete this.onEnterFrame;
  4. }
  5. stop();
  6. illusoft.Game.Instance.currentTile.StartToTime();
  7. this.onEnterFrame = function()
  8. {
  9.    var _loc1_ = int(illusoft.Game.Instance.currentTile.GetTimeLeft() / 1000);
  10.    var _loc2_ = _loc1_ % 60;
  11.    txtTime.text = int(_loc1_ / 60) + "  " + (_loc2_ >= 10 ? _loc2_ : "0" + _loc2_);
  12.    if(_loc1_ < 30)
  13.    {
  14.       if(_loc1_ > 28)
  15.       {
  16.          timer.gotoAndPlay("alarm");
  17.       }
  18.       if(_loc1_ < 1)
  19.       {
  20.          illusoft.Game.Instance.TimeOver();
  21.          StopTimer();
  22.       }
  23.    }
  24. };
  25.