In order to receive keyboard events, you have to have focus. In order to get focus in Flex, you have to implement IFocusManagerComponent.
HTH, -Alex ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of superabe superabe Sent: Wednesday, February 14, 2007 6:00 AM To: [email protected] Subject: [flexcomponents] Keyboard events for a custom component I am trying to create a custom component which is an AS3 class "MyComp" extending of UIComponent. MyComp composites (using addChild) another class "MySprite" that extends of Sprite. MySprite is a listener for Keyboard events and handles several key presses. The problem I see is that, when MySprite is used within MyComp, it fails to receive any Keyboard events. I tried listening for the "keyDown" event on MyComp itself, but that fails to fire too. What is the recommended approach for enabling keyboard events in custom componnets that extend UIComponent. Thanks, - superabe
