Flash是否会预定义任何keyCode常量? [英] Does Flash pre-define any keyCode constants?
问题描述
考虑到Adobe的工作方式,我希望可以使用静态常量引用某些非ASCII的键码,例如 KeyCode.UP_KEY
.我在做梦吗?还是只是假设38是永久性的向上键??
I would have expected, given the way Adobe seems to do things, that you could reference some of the non-ASCII keycodes using a static constant, for example KeyCode.UP_KEY
. Am I dreaming? Or do you just assume 38 will be the up key in perpetuity..?
推荐答案
我相信您正在寻找 Keyboard
类
Keyboard.UP
将指向上键, Keyboard.DOWN
将指向下键,依此类推.
Keyboard.UP
will refer to the up key, Keyboard.DOWN
to the down key, and so on.
请参见 http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Keyboard.html 了解更多密钥代码.
See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Keyboard.html for more key codes.
这篇关于Flash是否会预定义任何keyCode常量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!