home *** CD-ROM | disk | FTP | other *** search
- newTime = Math.floor(getTimer() / 1000);
- timePlay = newTime - timeStart;
- timeRemaining = timeGiven - timePlay;
- minutes = Math.floor(timeRemaining / 60);
- if(minutes < 10)
- {
- minutes = "0" + String(minutes);
- }
- else
- {
- minutes = String(minutes);
- }
- seconds = timeRemaining % 60;
- if(seconds < 10)
- {
- seconds = "0" + String(seconds);
- }
- else
- {
- seconds = String(seconds);
- }
- time = minutes + ":" + seconds;
- if(0 >= timeRemaining)
- {
- stop();
- _root.GameOver();
- }
- else if(timeRemaining == 10)
- {
- if(t != 1)
- {
- _root.soundTimer.start();
- t = 1;
- }
- }
-