jeudi 30 mars 2017

How do I click the wrong answer to waste time?

I'm developing a game of questions and I already have the time set and wanted to know how to do to when clicking the wrong answer the time comes down and blink red so people see that they missed. The game is for a air of andoird(Then touchEvents)

//1.
var count:Number = 41;

//2.
var myTimer:Timer = new Timer(1000,count);

//3.
myTimer.addEventListener(TimerEvent.TIMER, countdown);

//4.
myTimer.start();

//5.
function countdown(event:TimerEvent):void {
myText_txt.text = String((count)-myTimer.currentCount);
if(myText_txt.text == "0"){
  gotoAndStop(11)
}
}

Thank You!!

Aucun commentaire:

Enregistrer un commentaire