Using this script for a game countdown. Works fine but I would like to add “0” before the single digit #'s to make her look purdy.
Any help?
//the amount of time in seconds to count down from
timer = 10;
//create a new function
function countDown() {
//subtract one from timer
timer--;
//if timer equals zero
if (timer == 0) {
gotoAndStop(4);
//clears the countInt interval
clearInterval(countInt);
}
}
//sets countInt to call the countDown function every 1000 milliseconds (1 second)
countInt = setInterval(countDown, 1000);