Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Timer - How to stop it?

$
0
0

Hello,

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:


timer = 60;

countdown = function(){

_root.timer--;

if(_root.timer<=0){

  gotoAndPlay(20); stop();

}

}

countdownInterval = setInterval(countdown,1000);


Viewing all articles
Browse latest Browse all 13519

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>