Sunday, March 18, 2012

Flex SDK - Enable Keyboard Events at startup

------------ inside the MXML file ------------------

<![CDATA[

  function init() {
this.addEventListener(KeyboardEvent.KEY_DOWN,  keyDownHandler);
// so key events will work
stage.focus = this;
}

]]>
</fx:Script>