# FMX - How do I make a stopwatch/timer?

**URL:** <https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617>\
**Category:** flash\
**Created:** [April 29, 2003, 10:10pm UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617 "2003-04-29T22:10:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttorrey](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@ttorrey](https://forum.kirupa.com/u/ttorrey)\
**Post date:** [April 29, 2003, 10:10pm UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/1 "2003-04-29T22:10:52Z")

</div>

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.

[ttorrey@slc.edu](mailto:ttorrey@slc.edu)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 29, 2003, 10:11pm UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/2 "2003-04-29T22:11:48Z")

</div>

search the forums for “getTimer()”

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2003, 3:06am UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/3 "2003-04-30T03:06:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2003, 4:42am UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/4 "2003-04-30T04:42:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2003, 4:44am UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/5 "2003-04-30T04:44:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2003, 10:40am UTC](https://forum.kirupa.com/t/fmx-how-do-i-make-a-stopwatch-timer/19617/6 "2003-04-30T10:40:43Z")

</div>

you can use MX sample… :stunned:  
here…

cheers!
