Anyone know how I can put a stopwatch or a timer in my animation? I know how to do the digital clock, but I don’t want it to tell me what time of day it is, I want it to time the actions of my clips on the stage.
search the forums for “getTimer()”
I’m not really finding what I need. I need like a digital clock that displays running seconds (and miliseconds) instead of the time of day.
Maybe I’m not doing a thorough enough search. Any sugestions?
Hey I can help,
what you want to do is make a moive clip. Let’s call it timer. We also want its instance name to be timer. Inside that movie clip make 4 layers. On 3 of layers put the number 0 as a text box on each of them. Make sure its dynamic text. Name the minute 0 with a variable name of “minute”. Name the next one to the right “secm” and the last one “sec” now in your first frame put the following code
sorry got cut off put this in your first frame
if (secm == 5 and sec == 9) {
minute = minute+1;
secm = 0;
sec = 0;
} else if (sec == 9) {
sec = 0;
secm = secm+1;
} else {
sec = sec+1;
}
then insert a keyframe on fram 12 and put a gotoandplay(1) on there. Now go back to your root and on the first frame put this
_root.timer.minute=0;
_root.timer.sec=0;
_root.timer.secm=0;
Thats about it…im not the best at explaining so If you need more help just let me know
you can use MX sample… :stunned:
here…
cheers!