我可以在动作3中这样做吗?在调用定时器功能时,应该只定义一次计数器
function timer(e:TimerEvent):void
{
static var counter=1;
trace("Times: " + counter );
}
答案 0 :(得分:0)
怎么样:
function timer(e:TimerEvent):void
{
this.counter = this.counter || 0;
this.counter ++;
trace("Times: " + this.counter );
}