[問題] 鍵盤關閉的語法
var my_sound:Sound = new Sound();
my_sound.attachSound("a2");
a2_btn.onRelease = function() {
a2_btn.enabled = false;
ast_btn.enabled = false;
my_sound.start();
};
my_sound.onSoundComplete = function() {
a2_btn.enabled = true;
ast_btn.enabled = true;
};
ast_btn.onRelease = function() {
nextFrame();
};
keyListener.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
nextFrame();
}
};
Key.addListener(keyListener);
我想同時用按鈕跟鍵盤讓聲音播放,為了不讓聲音重複播放,
在聲音還沒撥完之前先把按鈕的觸發關掉,可是鍵盤的關掉語法不知道怎麼寫。
請問要怎麼讓鍵盤的觸發關掉呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.37.95
推
08/31 15:01, , 1F
08/31 15:01, 1F
→
08/31 15:01, , 2F
08/31 15:01, 2F
→
08/31 16:07, , 3F
08/31 16:07, 3F
→
08/31 16:09, , 4F
08/31 16:09, 4F
→
08/31 16:09, , 5F
08/31 16:09, 5F
→
08/31 16:11, , 6F
08/31 16:11, 6F
→
08/31 16:11, , 7F
08/31 16:11, 7F
討論串 (同標題文章)