No children of the Application have focus, so there are no events to
capture.  If you listen to the stage, you'll see everything.  The app is
not the top-level displayobject so your handlers will not pick up events
from popups either.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of zhongtie
Sent: Saturday, November 24, 2007 6:22 PM
To: [email protected]
Subject: [flexcoders] Application container failed to capture
KeyboardEvent

 

My simple flex app somehow doesn't respond to key event, but mouse
events work fine. Any ideas?

Thanks,
Tie

--- src code ---

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> "
layout="absolute"
keyDown="onEvent(event)"
mouseDown="onEvent(event)">
<mx:Script>
<![CDATA[
protected function onEvent(e:Event):void {
trace(e.type);
}
]]>
</mx:Script>
</mx:Application>

 

Reply via email to