I’ve seen a lot of code out there for timers, but I’m having trouble finding one that counts up and displays minutes seconds and hundredths of a second. I’m wanting to use it for a game, so I’m not looking for one of those date hour minute second countdown timers. I’m a little overwhelmed by all the timers. Could someone point me to one that can do this?
I attached code from an example that counts up in seconds.
Thanks!
Jason
//this is the number displayed
timed = 1;
//Makes the Timer equal 100. Change it to whatever number you want.
clearInterval(id);
//If this wasnt here, after the first second the function would run everyframe, this runs on milliseconds so 1000 miliseconds = 1 second
id = setInterval(function () {
_root.timed++;
}, 1000);
this.onEnterFrame = function() {
if (_root.timed<=0) {
_root.timed = "Time";
//trace(countdown);
}
};