backgroundColor="white" initialize="initMe()">
import flash.utils.Timer;
import mx.effects.Glow;
[Bindable]
public var secondsTillDue:int = 120;
public var myTimer:Timer;
public var myEffect:Glow;
public function initMe():void
{
myTimer = new Timer(1000);
myTimer.addEventListener('timer',warnIfClose);
myTimer.start();
myEffect = new Glow();
myEffect.alphaFrom = 1.0;
myEffect.alphaTo = 0.3;
myEffect.blurXFrom = 0.0;
myEffect.blurXTo = 50.0;
myEffect.blurYFrom = 0.0;
myEffect.blurYTo = 50.0;
myEffect.color = 0xFF0000;
myEffect.duration = 750;
}
public function warnIfClose(event:TimerEvent):void
{
secondsTillDue=secondsTillDue-1;
if(secondsTillDue < 90)
{
myEffect.target = idDueLabel;
myEffect.play();
}
}
id="idDueLabel" />