Does Flash pre-define any keyCode constants?

∥☆過路亽.° 提交于 2021-01-28 06:41:40

问题


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..?


回答1:


I believe you are looking for the Keyboard class

Keyboard.UP will refer to the up key, Keyboard.DOWN to the down key, and so on.

See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/ui/Keyboard.html for more key codes.



来源:https://stackoverflow.com/questions/8110073/does-flash-pre-define-any-keycode-constants

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!