我一直在收到此錯誤,但我不知道如何解決此問題,它在另一個類中工作,因此它應該在此處工作, 對? (我把它從該類到這一個),唯一的區別是,這個類擴展「遊戲」和其他類擴展「影片剪輯」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