PDA

View Full Version : stage keyboard event listener problem



activa
July 15th, 2008, 06:10 PM
This line:

stage.addEventListener (KeyboardEvent.KEY_DOWN, checkArrowKey);

works in the player but not in a browser. How can I capture arrow key input (I'm guessing the browser is capturing it first). Is this a focus issue?

sekasi
July 15th, 2008, 10:31 PM
Listen to Event.ACTIVATE and Event.DEACTIVATE.

They will tell you when your flash app has focus and capture keys properly.

activa
July 16th, 2008, 09:03 AM
Listen to Event.ACTIVATE and Event.DEACTIVATE.

They will tell you when your flash app has focus and capture keys properly.

Thanks--but how do I implement this? I don't understand where I place this code.