Skip to main content
Known Participant
December 19, 2009
Answered

No keyboard input detection when running in Firefox?

  • December 19, 2009
  • 2 replies
  • 1660 views

I've got a game that accepts and responds to keyboard input just fine if I run the .swf file in Flash Player.  However, when I open a Firefox browser and click Open file... for this .swf file, everything except keyboard input works (collision detection, AI, animation, etc.). 

Any clue why?

This topic has been closed for replies.
Correct answer

you can force focus in AS but you might have to find a js script to also give the swf object focus on the page.

stage.focus=__

2 replies

SylvandyrAuthor
Known Participant
December 19, 2009

Thanks guys... I'm not even sure what to look up when trying to find out how to work around the browser focus issue with code. Typing "browser focus issues" would just give me lots of complaints about the issues... Any suggestions?

Is it even possible to detect focus problems and then do something about it with ActionScript?

Correct answer
December 19, 2009

you can force focus in AS but you might have to find a js script to also give the swf object focus on the page.

stage.focus=__

SylvandyrAuthor
Known Participant
December 19, 2009

Thanks, I'll keep that in mind for later.


kglad
Community Expert
December 19, 2009

i don't see that problem.

what code are you using?

December 19, 2009

Firefox has a known issue with FOCUS mouse and keyboard. do you have a mac perchance?