hello
I work at project to build dance game with AS 3.0 control by Page Dance. I got problem when player s开发者_StackOverflow中文版tomp two button in same time. How to detect it?Thank you.
There is a lot of code in that pastebin, but the problem should not lie in your onKeys
function.
What does this code do for you, when you press up and down at once?
function keyPressed(e:KeyboardEvent) {
trace("Key event: " + e.keyCode);
}
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
It returns two keycodes instantly for me. If it doesn't for you, your keyboard might not support for those two buttons to be pressed at once (most keyboards have a certain number of keys that are cross-wired to save cost, making it impossible to press them at once).
精彩评论