Skip to main content
Inspiring
February 18, 2015
Answered

key_up event not working

  • February 18, 2015
  • 1 reply
  • 339 views

Never actually ran into this problem before, the following code is throwing no errors but the KEY_UP event won`t work. (KEY_DOWN works as expected)

What am I missing here? Have tried focus-trick and forcing capture phase.

stage.focus = stage;

stage.addEventListener(KeyboardEvent.KEY_UP, upHandler, true);

private function upHandler(e:KeyboardEvent):void

{

trace(e.keyCode);

}

win7-Flash CC 13.1.0.226

This topic has been closed for replies.
Correct answer moccamaximum

Found the solution shortly after: There was a keyObject in my class that overrrid the listener.

1 reply

moccamaximumAuthorCorrect answer
Inspiring
February 18, 2015

Found the solution shortly after: There was a keyObject in my class that overrrid the listener.