//change the Color of horse Race Light
private var statusLight_color:String="statusLight2";
private var statusLight_rate2:int=500;//rate
private var statusLight_rate1:int=2*statusLight_rate2;
private function changeColor():void
{
var useTime1:Timer=new Timer(statusLight_rate1,0);//8s 之后才调用对应的函数
useTime1.addEventListener(TimerEvent.TIMER,timeChangeColor1);
useTime1.start();
}
private function timeChangeColor1(event:TimerEvent):void
{
statusLight_bt.styleName="statusLight0";//默认颜色
var useTime2:Timer=new Timer(statusLight_rate2,1);//设置频率(大则高)
useTime2.addEventListener(TimerEvent.TIMER,timeChangeColor2);
useTime2.start();
}
private function timeChangeColor2(event:TimerEvent):void
{
statusLight_bt.styleName=statusLight_color;//设置不同颜色
}
private var statusLight_color:String="statusLight2";
private var statusLight_rate2:int=500;//rate
private var statusLight_rate1:int=2*statusLight_rate2;
private function changeColor():void
{
var useTime1:Timer=new Timer(statusLight_rate1,0);//8s 之后才调用对应的函数
useTime1.addEventListener(TimerEvent.TIMER,timeChangeColor1);
useTime1.start();
}
private function timeChangeColor1(event:TimerEvent):void
{
statusLight_bt.styleName="statusLight0";//默认颜色
var useTime2:Timer=new Timer(statusLight_rate2,1);//设置频率(大则高)
useTime2.addEventListener(TimerEvent.TIMER,timeChangeColor2);
useTime2.start();
}
private function timeChangeColor2(event:TimerEvent):void
{
statusLight_bt.styleName=statusLight_color;//设置不同颜色
}