Re: [問題] dear all

看板Flash作者 (moonet)時間17年前 (2008/10/11 10:44), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
※ 引述《kunde (Kunde)》之銘言: : 各位好~~ : 這是我們寫的一個小遊戲~~ : http://140.122.91.37 : 但是~~他的操控還有點不穩~~ : 反應沒有那麼快~~ : 有建議使用怎樣的函式庫嗎? : 下面是我們用的~~ : function a(event:KeyboardEvent):void { : if (event.keyCode==37) { : box1.rotation-=2; : } : if (event.keyCode==39) { : box1.rotation+=2; : } : } 因為鍵盤按住是 *-------********* *代表呼叫KeyboardEvent 為了避免這種延遲 在as2時通常會使用Key.isDown (Key.isDown 方法) public static isDown(code: Number ) : Boolean F1裡面有範例: 下列 Script 能讓使用者控制某個影片片段 (car_mc) 的位置: car_mc.onEnterFrame = function() { if (Key.isDown(Key.RIGHT)) { this._x += 10; } else if (Key.isDown(Key.LEFT)) { this._x -= 10; } }; -- blog:http://etrex.blogspot.com/ site:http://web.ntust.edu.tw/~B9409041/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.120.112.186
文章代碼(AID): #18y1B_sj (Flash)
討論串 (同標題文章)
本文引述了以下文章的的內容:
問題
2
3
以下文章回應了本文
完整討論串 (本文為第 2 之 4 篇):
問題
1
6
問題
2
3
文章代碼(AID): #18y1B_sj (Flash)