With the help of an online tutorial, I created a simple 60 second countdown timer. I'd really like the text color to change to red once the timer hits 10 seconds. Any clue how I can add to this AS to make that happen?
Bonus question: when the timer hits zero, I'd love for the entire text field to fade out so that the zero isn't visible anymore. Any thoughts on that?
Here's my code, and thank you!!!
var nCount:Number = 60;
var myTimer:Timer = new Timer(1000, nCount);
timer_txt.text = nCount.toString();
myTimer.start();
myTimer.addEventListener(TimerEvent.TIMER, countdown);
function countdown(e:TimerEvent):void
{
nCount--;
timer_txt.text = nCount.toString();
}