Question: How do I initiate the flash with out using the mouse click. For example I built a flash game utilizes the keyboard as the main controller and I want the flash game to listen for the key clicks to move the item in the game. The problem is when the page loads, flash does not have the focus so clicking on any key only controls the browser window and not the flash.
Answer: Use a JavaScript call on the body tag “onLoad” event like below to set the focus on the flash game using the flash embed id name like so:
<body onLoad="window.document.flashIDname.focus();">
flashIDname = The is the name of flash movie without the ".swf".
NewSourceMedia is providing links to these listings as
a courtesy, and makes no representations regarding the content or
any information related thereto. Any questions, complaints or claims
regarding the downloaded content or details must be directed to the appropriate
publisher. We do not encourage or condone the use of any
software in violation of applicable laws.