我一直在收到此错误,但我不知道如何解决此问题,它在另一个类中工作,因此它应该在此处工作, 对? (我把它从该类到这一个),唯一的区别是,这个类扩展“游戏”和其他类扩展“影片剪辑”AS3#1067将flash.utils.timer类型的值强制转换为无关类型函数
1067: Implicit coercion of a value of type flash.utils:Timer to an unrelated type Function.
public static var timeLeft;
public function GamePlay() {
// Start timer
var timeCounter:Timer = new Timer(1000, timeLeft)
timeCounter.addEventListener(TimerEvent.TIMER, timeCounter);
timeCounter.start();
}
// Handle time counter
public function timeCounter(e:TimerEvent):void {
timeLeft--;
trace(timeLeft);
}
我现在看到了,谢谢 – Snakybo 2013-02-22 19:09:13