11 Replies Latest reply on Mar 27, 2008 6:10 AM by RodrigoTatto

    Canvas & keyDown handler

      Hi forum,
      I'm developing component based on Canvas. I need to check which key was pressed but it looks like keyDown event is never thrown.

      Could you advice me where the problem is? Thanks.


      My code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml" width="100%" height="100%" keyDown="onkeyDown(event)">
      import mx.controls.Alert;

      private function onkeyDown(event:Event):void