home *** CD-ROM | disk | FTP | other *** search
- _global.clockTimer = function()
- {
- if(!this.startTimer && _root.playerState != "die")
- {
- this.startTimer = getTimer();
- this.lastTimer = getTimer();
- this.secs = 80;
- this.millisecs = 99;
- }
- if(this.secs > 0)
- {
- this.curTimer = getTimer();
- if(this.curTimer - this.lastTimer > 1000)
- {
- this.lastTimer = this.curTimer;
- this.secs = this.secs - 1;
- }
- this.millisecs = this.curTimer % 100;
- if(this.secs > 9)
- {
- this.display.text = [this.secs + " :" + this.millisecs];
- }
- else
- {
- this.display.text = ["0" + this.secs + " :" + this.millisecs];
- }
- }
- else if(!this.exploded)
- {
- this.exploded = true;
- this.display.text = "00 :00";
- _root.playerHealth = 0;
- _root.playerState = "die";
- _root.explode.start();
- _root.game.halo.gotoAndPlay("fire");
- this.startTimer = false;
- delete this.onEnterFrame;
- }
- };
-