# Timer - how to stop it?

**URL:** <https://forum.kirupa.com/t/timer-how-to-stop-it/332418>\
**Category:** flash\
**Created:** [June 2, 2014, 12:25pm UTC](https://forum.kirupa.com/t/timer-how-to-stop-it/332418 "2014-06-02T12:25:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![melfs](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@melfs](https://forum.kirupa.com/u/melfs)\
**Post date:** [June 2, 2014, 12:25pm UTC](https://forum.kirupa.com/t/timer-how-to-stop-it/332418/1 "2014-06-02T12:25:31Z")

</div>

[COLOR=#000000][FONT=Helvetica Neue]Hello, [/FONT][/COLOR]  
[COLOR=#000000][FONT=Helvetica Neue]I am learning how to make a timer to my game. It is something like “Who wants to be a millionaire?” I have 15 questions. There is timer for each question:60 seconds… When I click on an answer I go on next frame, but my timer does not stop. What should I add ( and where ) to stop my timer when I clik an answer? My code for the timer is: [/FONT][/COLOR]

```auto
[COLOR=#000000][FONT=Helvetica Neue]timer = 60; [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]countdown = function(){ [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]_root.timer--; [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]if(_root.timer<=0){ [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]gotoAndPlay(20); stop(); [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]} [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]} [/FONT][/COLOR]
[COLOR=#000000][FONT=Helvetica Neue]countdownInterval = setInterval(countdown,1000);[/FONT][/COLOR]

```
