1
我已經創建了四個影片剪輯newGame,說明,關於它們都在menuScreen中。我現在面臨的問題是當我點擊孩子的人會收到以下錯誤Flash AS3上嵌套的影片剪輯
ArgumentError: Error #1063: Argument count mismatch on hangMan_fla::MainTimeline/init(). Expected 0, got 1.
我的代碼如下
function startGame() :void {
stage.addChild(menuScreen);
menuScreen.mouseEnabled = false;
//menuScreen.mouseChildren = false;
menuScreen.x = 278;
menuScreen.y = 168;
this.menuScreen.removeEventListener(MouseEvent.MOUSE_UP,init);
this.menuScreen.newGame.addEventListener(MouseEvent.MOUSE_UP,this.init);
this.menuScreen.instruction.addEventListener(flash.events.MouseEvent.MOUSE_UP, this.init);
this.menuScreen.about.addEventListener(MouseEvent.MOUSE_UP, this.init);
}
function init():void
{
trace("this is working");
tween = new fl.transitions.Tween(menuScreen, "y", fl.transitions.easing.Strong.easeOut, menuScreen.y, (-this.menuScreen.height)/2, 0.8, true);
}
傳說!!!歡呼隊友 – usrNotFound
不用擔心。你能接受答案嗎? – Jono
我做過隊友。歡呼@JonoRR – usrNotFound