0
我想用按鈕跳轉到框架標籤。他們跳到標籤上很好,但再次按下時不會停下來。下面是我用來讓按鈕再次按下時休息的代碼。保持放在框架標籤上
getting_btn.addEventListener(MouseEvent.CLICK, gettingStarted);
function gettingStarted(evt:MouseEvent):void {
gotoAndPlay("ipad_in");
if (this.currentLabel == "ipad_rest"){
this.gotoAndStop("ipad_rest");
}
}
不知道我明白你想要做什麼。在第一次點擊時,您希望它轉到標有「ipad_in」的幀,如果它已經在幀「ipad_in」上,然後轉到幀「ipad_rest」,則第二次點擊。這是你正在尋找的結果嗎? – 2011-05-16 20:48:14
是的,我明白了。 Duh不得不翻動它們,所以它首先檢查標籤,然後去正確的幀標籤。 函數getsStarted(evt:MouseEvent):void if(this.currentLabel ==「ipad_rest」) this.gotoAndStop(「ipad_rest」);其他 gotoAndPlay(「ipad_in」); } – cbeezy 2011-05-16 20:49:46