开发者

Disable A Particular Key in AS3

I know it should be simple, but I can't find a solution to this question.

How do i disable a particular key in AS3?

开发者_如何学运维

e.g. disable 'A' key, or 'Minus' key etc...

Thanks in advance for your help.


for a DisplayObject: listen to KeyboardEvent.KEY_DOWN and if event.charCode is one you need to restrict call event.stopImmediatePropagation()
for an input TextField: use TextField.restrict property

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜