djp1988 Posted March 8, 2008 Share Posted March 8, 2008 Hi I have a site and on one of my flash movies I request for the user to press keys, but it only works when the person clicks in the movie and then presses the keys, here :http://www.actionscriptcoding.com/Experime...t+In+Action+%21What can i do to bi-pass this? Link to comment Share on other sites More sharing options...
pabretherton Posted March 9, 2008 Share Posted March 9, 2008 Well without looking at your page and really only guessing from writing similar stuff in JavaScript - perhaps all you need to do is have an onload in your body tag and set the focus to your flash object? If that works - you'll probably need to reset the focus everytime your flash object loses it. So long as you've nothing else that requires focus on your page (like a text field say) - It should be fine. Link to comment Share on other sites More sharing options...
djp1988 Posted March 9, 2008 Author Share Posted March 9, 2008 Sounds like you have the solution, but i am having trouble making it work, I have tried: <body onload="swfplayer.focus()"> and <body onfocus="swfplayer"> swfplayer being the ID of the <OBJECT> containing the flash animation. Link to comment Share on other sites More sharing options...
pabretherton Posted March 9, 2008 Share Posted March 9, 2008 Well I quickly chucked this into IE7:-<embed src="flashthing.swf" onblur="this.focus()">And works fine!But then I tried it in FFox - doesn't work at all? - I messed about for half an hour but still couldn't get it to work. I grew up on IE so you'll need a foxpert to get it to work with fox! Link to comment Share on other sites More sharing options...
justsomeguy Posted March 10, 2008 Share Posted March 10, 2008 Do a Google search for SWFObject, use something like that to embed your movie. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.