title: Giving a Flex application the focus in browser to capture keystrokes
body: <p>I've written a <a href="http://www.automatous-monk.com/twistedlife/" rel="nofollow noreferrer">little video game</a> in Flex that runs in a browser.  The player moves by pushing the arrow buttons on the keyboard, so I need to capture those keystrokes.  In fact, the game action starts when the player presses one of those keys.</p>
  
  <p>In order to capture the keystrokes, the Flash/Flex application, not just the browser, needs to have the focus.</p>
  
  <p>How can I ensure that the application has the focus?  I've implemented a bit of a hack: A "Begin" button you must click to start the game.  The only point of this button is to ensure that the app has the focus.  Is there a better solution to this?</p>