开发者

Disable A Particular Key in AS3

开发者 https://www.devze.com 2023-02-28 13:35 出处:网络
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?开发者_如何学运维

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

精彩评论

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