Thanks for trying that, and that sounds like potentially good news. I'm not sure how to listen to the stage... I put the listener in the component with the canvas that is the parent of the objects... I assume the stage is at a higher level in the hierarchy? How would I pass the event back down to the canvas that needs it?
Note that this canvas/container did get an activate event when I came back, and in that event's handler I added the listener, but nothing happened. Thanks, Jack --- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote: > > I just tried the simple test. If you listen to the stage for keyDown, > it repeats when the player is clicked on again in IE. Can you try that? > > -Alex > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Alex Harui > Sent: Thursday, May 10, 2007 12:47 PM > To: flexcoders@yahoogroups.com > Subject: RE: [flexcoders] Re: keypress stops working after browser loses > focus > > > > Yeah, and that's the discussion point here. How much power do we give > game devs w/o enabling spyware. I think you're describing a possible > bug, but it may be an OS limitation. > > -Alex > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of jack_freud > Sent: Thursday, May 10, 2007 11:34 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: keypress stops working after browser loses > focus > > > > What I'm making is a simple tool similar to a flowchart, where > people can drag objects onto the canvas, then drag arrows too, to > connect the first objects. I got it so that they could rotate the > arrows using the cursor keys on the keyboard, but as soon as the > browser is deactivated, this doesn't work anymore when you come > back. > > I guess I have to try another approach. > > Isn't there a hope that people might program games in Flex? If so, > I'd think that keyboard support would be essential, at least for > some games. > > Thanks, > Jack > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Alex Harui" <aharui@> wrote: > > > > graphical things haven't been the main focus of Flex, but system > > security is tantamount and the player doesn't want to allow you to > sniff > > keystrokes from other applications so when you lose activation > lots of > > things may stop working. I've marked this to try in a simple > testcase, > > but it may be a while before we get around to it. > > > > -Alex > > > > ________________________________ > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > ] On > > Behalf Of jack_freud > > Sent: Thursday, May 10, 2007 10:59 AM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Re: keypress stops working after browser > loses > > focus > > > > > > > > Not sure I understand. I'm clicking in it to make sure it has > focus. > > In fact I tried adding activate and deactivate handlers for the > > container, and in the activate I add the keydown listener. Tracing > > shows that the activate event fired, but the keydown event never > > shows up again. > > > > I'm surprised this doesn't work... how can you use flex to do > > graphical things with the keyboard if you can't listen to it? > > > > Thanks for responding, > > Jack > > > > --- In flexcoders@yahoogroups.com > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > , "Alex Harui" <aharui@> wrote: > > > > > > I don't know if we can solve that one, especially in all > browsers. > > > Usually when the browser becomes active the player instance still > > > doesn't have focus. And once you give it focus, it may have > > forgotten > > > its repeat state. Keyboard related stuff is a topic of > discussion > > at > > > Adobe these days. > > > > > > -Alex > > > > > > ________________________________ > > > > > > From: flexcoders@yahoogroups.com > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > > > [mailto:flexcoders@yahoogroups.com > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > 40yahoogroups.com> > > ] On > > > Behalf Of jack_freud > > > Sent: Thursday, May 10, 2007 8:26 AM > > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > <mailto:flexcoders% > 40yahoogroups.com> > > > Subject: [flexcoders] Re: keypress stops working after browser > > loses > > > focus > > > > > > > > > > > > For what it's worth, I meant keydown. > > > > > > Still stuck! > > > > > > --- In flexcoders@yahoogroups.com > <mailto:flexcoders%40yahoogroups.com> > > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders% > > 40yahoogroups.com> > > > , "jack_freud" <jack_web@> wrote: > > > > > > > > Hi, > > > > > > > > I'm using keypress events to rotate a sprite on a canvas. It > > works > > > > fine until you click on some other window on your desktop, > then > > come > > > > back to the browser. Then you can click on things with no > > problem > > > but > > > > the keypress event stops firing. > > > > > > > > I'm listening for the event in the container, as I couldn't > find > > a > > > way > > > > to give my sprite component focus itself. > > > > > > > > Any help would be much appreciated! > > > > > > > > Jack > > > > > > > > > >