[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]
[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]