-
Another timer question
I've downloaded a timer from mbenny Link.
This code is on the first frame together with a dynamic instancename called "textbox".
Code:
onEnterFrame = function () {
time = getTimer();
miliseconds = time;
minutes = Math.floor(miliseconds/1000/60);
miliseconds -= minutes*1000*60;
seconds = Math.floor(miliseconds/1000);
miliseconds -= seconds*1000;
miliRound = Math.round(miliseconds/10);
min = (minutes<10 ? "0" : "")+minutes;
sec = (seconds<10 ? "0" : "")+seconds;
ms = (miliRound<10 ? "0" : "")+miliRound;
textbox.text = min+":"+sec+":"+ms;
};
I've put this source into a mc, and it works perfectly.
But now i tried everything i know to reset the timer to 0, and begins counting again. It just won't work, or i get nothing to see at all in the dynamic textbox.
Could anyone help me out here?
Thanks in advance
-
ah very nifty :P Why thinking difficult when it can be so damn simple ;)
I'll try it rigth away, thanks!