Archive

Posts Tagged ‘JavaScript’

Firefox with wmode ignores Key.isDown()

March 8th, 2007 Fraser Crosbie 1 comment

I am sure this is old news to many of you, but today was the first time I have run into this issue. I am working on a site for a client that has very high accessibility requirements. I originally built my project to be controlled using the mouse and was asked this morning to add the ability to navigate it using the arrow keys of the keyboard. It only took me a couple minutes to get this functionality working in Flash, but when I tested it using Firefox I was not getting any response from the keyboard. I tried it out in IE7 and everything worked like a charm. After a couple minutes of searching I came across this site and found my solution. Apparently Firefox always returns the Key.isDown() function as false if you have wmode=”transparent” or wmode=”opaque” in your html object and embed tags, but if you use Key.getCode() everything works perfect.

Here is a snippet of code showing the workaround to this issue:

Read more…