I know this is a long-standing issue, but are there any developments in the
works to prevent this sort of behaviour? I know there are work-arounds to
Flash being able to obtain focus programmatically, such as using
ExternalInterface calls from Javascript to pass keyboard events. However,
stuff like that has always struck me as hacky.

In an ideal world, the Flash plugin would have the authority to demand focus
and receive programmatic focus across all browsers.



On Nov 26, 2007 3:37 PM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    Nope, the browsers always steal focus.
>
>  ------------------------------
> *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
> Behalf Of *zhongtie
> *Sent:* Monday, November 26, 2007 9:02 AM
> *To:* flexcoders@yahoogroups.com
> *Subject:* [flexcoders] Re: Application container failed to capture
> KeyboardEvent
>
>  Thanks Alex. That works!
>
> When I switch to another application and then switch back, my all
> flash application loses the focus and no event fires at all unless I
> click somewhere in it. Is there any way around it?
>
> Tie
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Alex
> Harui" <[EMAIL PROTECTED]> wrote:
> >
> > 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: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com> [mailto:
> flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>] On
> > Behalf Of zhongtie
> > Sent: Saturday, November 24, 2007 6:22 PM
> > To: flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>
> > 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