Re: [flexcoders] Re: Application container failed to capture KeyboardEvent

2007-11-27 Thread Brent Dearth
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
 

  



RE: [flexcoders] Re: Application container failed to capture KeyboardEvent

2007-11-27 Thread Alex Harui
plugins are at the mercy of the browser.  Maybe enough of you can
pressure Mozilla and MS and others to provide better functionality for
plugins.



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brent Dearth
Sent: Tuesday, November 27, 2007 8:23 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Application container failed to capture
KeyboardEvent



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]
mailto:[EMAIL PROTECTED]  wrote:




Nope, the browsers always steal focus.



From: flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  [mailto:flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com ] On Behalf Of zhongtie
Sent: Monday, November 26, 2007 9:02 AM
To: flexcoders@yahoogroups.com
mailto: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
mailto: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
mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of zhongtie
 Sent: Saturday, November 24, 2007 6:22 PM
 To: flexcoders@yahoogroups.com
mailto: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 
 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







 


Re: [flexcoders] Re: Application container failed to capture KeyboardEvent

2007-11-27 Thread Brent Dearth
I was hoping to hear that Adobe was already pursuing this issue. It would
require a bit of coordination to establish an acceptable level of security
from a browser implementation standpoint, but seeing as flash content is so
pervasive, shouldn't be out of the question. I think it's one of those
things that Adobe would have to put its weight behind, honestly.


On Nov 27, 2007 12:18 PM, Alex Harui [EMAIL PROTECTED] wrote:

plugins are at the mercy of the browser.  Maybe enough of you can
 pressure Mozilla and MS and others to provide better functionality for
 plugins.

  --
 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Brent Dearth
 *Sent:* Tuesday, November 27, 2007 8:23 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* Re: [flexcoders] Re: Application container failed to capture
 KeyboardEvent

  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:flexcoders@yahoogroups.com ]
  *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.comflexcoders%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
  
 
 
   



[flexcoders] Re: Application container failed to capture KeyboardEvent

2007-11-26 Thread zhongtie
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, 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 [mailto:[EMAIL PROTECTED] On
 Behalf Of zhongtie
 Sent: Saturday, November 24, 2007 6:22 PM
 To: flexcoders@yahoogroups.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





RE: [flexcoders] Re: Application container failed to capture KeyboardEvent

2007-11-26 Thread Alex Harui
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 mailto: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 mailto:flexcoders%40yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
] On
 Behalf Of zhongtie
 Sent: Saturday, November 24, 2007 6:22 PM
 To: flexcoders@yahoogroups.com mailto: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 
 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