complete game within 20 sec
game limit is 1 min but if user will complete game within 20 sec then he will get 500 bonus points
how to code for this
//this is count up timer script
var intID;
var endTime = getTimer()+(59*1000);
makeTime();
function updateTimer() {
var t = endTime-getTimer();
if (t>0) {
makeTime();
showTime(t);
} else {
stopTimer();
showTime(0);
gotoAndStop("over");
trace("lost");
}
}
function makeTime() {
clearInterval(intID);
intID = setInterval(updateTimer, 100);
}
function stopTimer() {
clearInterval(intID);
}
function showTime(t) {
dispTime.text = (t/1000) >> 0;
}