home *** CD-ROM | disk | FTP | other *** search
- function StopTimer()
- {
- delete this.onEnterFrame;
- }
- stop();
- illusoft.Game.Instance.currentTile.StartToTime();
- this.onEnterFrame = function()
- {
- var _loc1_ = int(illusoft.Game.Instance.currentTile.GetTimeLeft() / 1000);
- var _loc2_ = _loc1_ % 60;
- txtTime.text = int(_loc1_ / 60) + " " + (_loc2_ >= 10 ? _loc2_ : "0" + _loc2_);
- if(_loc1_ < 30)
- {
- if(_loc1_ > 28)
- {
- timer.gotoAndPlay("alarm");
- }
- if(_loc1_ < 1)
- {
- illusoft.Game.Instance.TimeOver();
- StopTimer();
- }
- }
- };
-