check keyboard state without using KeyboardEvent in AS3

Posted by Pieter888 on Stack Overflow See other posts from Stack Overflow or by Pieter888
Published on 2010-04-10T11:30:49Z Indexed on 2010/04/10 11:33 UTC
Read the original article Hit count: 351

Is it possible to check for pressed keys without using the KeyboardEvent?

I have an ENTER_FRAME event setup called enterFrameHandler and I want to check within the function enterFrameHandler if any keys are pressed.

normally when using a KeyboardEvent I could check for keys easily using a switch that checks the KeyCode of the event, but in an ENTER_FRAME event this isn't possible for me.

Is there any other way of checking the keyboard's state within the ENTER_FRAME event?

© Stack Overflow or respective owner

Related posts about flash

Related posts about actionscript-3