I don't really know and I haven't tried it but, set the focus property on the stage to the sprite you want to have focus. I think that this will give keyboard focus to the sprite.
I've been considering doing Actionscript only project for a few experiments but I haven't jumped in yet. I'm curious to how well your experience has gone. paul --- In [email protected], "thirtyfivemph" <[EMAIL PROTECTED]> wrote: > > I've created an ActionScript Project, so no UIComponent controlling focus. > > I've got the root of my app, a sprite, it has a child sprite and a > grandchild sprite. > > I was under the impression (nee, utter certainty) that I could stick a > "addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown)" in my grandchild > sprite and it would get the event (passed down the display list). > Well, it doesn't... > > So, I tried a few things, and even my top-level sprite (the one > directly parented to the stage) doesn't get keyboard events. Only if I > add my event listener to the *stage* do I get keyboard events. > > Am I wrong that keyboard events flow through the display list (like > mouse events or ENTER_FRAME)? > > I guess it would depend on who had the focus, but how is that > controlled in an AS project with all sprites? And wouldn't my > top-level sprite get the focus when the app launches? > > The docs are all focused on Flex, so it's tough to get an answer to > this in a world without the FocusManager! ;-) > > Troy. >

