No wmode please, we’re British! AKA the @ key flash bug
Friday 2nd June 2006 at 1:34 pmWe ran into a major problem last night when deploying http://www.englandallstars.com
The swf in question contained a form allowing users to type in email addresses. The trouble was that anyone with a British keymapping, using the Firefox browser, got a US English keymapping on text entry. This meant that users wanting to type email@domain.com ended up typing email”domain.com instead. If users happened to know that the ‘@’ symbol is over the ’2′ key on a US keyboard, they’d figure it out, if not they’d be left scratching their heads.
We scratched our heads too.
It worked fine in Internet Explorer, the problem only occurred in Firefox (with Flash Player 8 ). The SWF had been exported using Flash 8 Pro, on a Mac G5. The keymapping preferences on that machine were set to British, although for whatever reason this particular G5 was still effectively using a US English keymapping. Weird. The SWF had also been compiled repeatedly using MTASC on Windows and Linux before final export was done from Flash on the Mac (so that all the fancy fonts showed up properly).
It turned out that the problem had nothing to do with the way the SWF was produced. After a few hours of experiments, we figured out that the problem was some wmode code on the embed tags:
[code][/code]
Deleting the wmode=”transparent” solved the problem, for both SWFObject and standard Macromedia embeds. If you have a British keymapping, you can see this behaviour at our wmode bug documentation page (users with US English keymappings won’t notice the problem). It would be interesting to know if other keymappings suffer from the same problem. Anybody want to let us know?

Don’t know if you’ve noticed, but all Macs have the US layout with the ‘@’ symbol on the ’2′ key whether the keyboard is set to british or not.
I only found out when I bought my first PC a couple of years ago and enquired on a forum as to why the ‘@’ symbol was in the wrong place.
Wow, thanks for finding this. We are having this exact problem for http://www.sonic-city.com – thanks to your discovery we can implement a fix! Thanks again!
So what we have to do if we need a transparent bg with a mail form? I have the same problem with an italian keyboard and when I try to type the @ I type the ò
” It would be interesting to know if other keymappings suffer from the same problem. Anybody want to let us know?”
The problem occurs with Swedish keyboards too.
Great to solve the @ problem but I need wmode=”transparent” for my drop-down menus to show over the top of the swf.
Anybody know how I can still use this parameter AND accept the @ sign in Firefox?
The same erros occurs with German keymapping. You’ll get an “q” when trying to type an @.
The bug still exists in the Mozilla / Firefox FlashPlayer 9 which means either Macromedia are unaware of the problem or its a bug with the Mozilla engine. Its completely ludicrous, you make the movie background transparent and the keyboard layout defaults to US ??? That sounds like very very sloppy coding to me.
Mooska on actionscripts forms offers a work around here:
http://www.actionscript.org/forums/showthread.php3?t=109412
But I have to say it is rather sloppy
I had this bug in both IE and Firefox.
Removing the wmode tags fixed firefox, but the problem remains in IE (6).
This happens even loading the flash file directly into the browser with no html.
IE version 6.0.2800.1106
Windows 2000 v 5.002195 (Service pack 4)
Flash Player 9
Hey !
Happy to see that i’m not alone !!
French key mapping is affected too !
I’m using the wmode transparent for my website http://www.norwayseries.com
The second series is ready, wanted to lauch today, but have this problem with FF and wmode, for a new contact section… (flashform)
So the “@” is missing, like “.” too
When i type :
“@” i get “”
“.” i get “:” (but i can use the “.” from the num pad)
My trick (without using a boring long code)
I put a “@” directly in the field of mail textarea (by ex : mail = “you@yourdomain.com”; and for the action erase button (on release… var mail = “you@yourdomain.com”; too)
To obliged folks to replace directly you and yourdomain, “@” is viewable…
Ok it’s not a great solution, but could be one by waiting a great one.
Horray – I knew I wasn’t going mad! This is extremely frustrating, and I wish I hadn’t spent 2 hours yesterday trying to figure out why it was borked.
My quick fix for this if you need to set wmode to transparent and have @ symbols, OK OK so now you can’t enter a ” in the text field but if its for a form that is only expecting an email address it shouldn’t matter.
keyPresser = new Object();
keyPresser.onChanged = function(in_txt:TextField) {
trace(“string = ” (Key.getAscii()))
if (34 == ((Key.getAscii())) || 64 == ((Key.getAscii()))) {
in_txt.text = in_txt.text.slice(0,in_txt.text.length-1) “@”;
}
};
Key.addListener(keyListener);
input_txt.addListener(keyPresser);
Hope this helps someone.
I ran into a similar problem, but in a different form. We were using key listeners for navigation where we just looped through an array to load text content into a component. The key listeners for left and right arrow were in the code and worked on IE once the flash object was active, but failed in Firefox. At first I tried a recent javascript fix the Adobe came out with to insure the object was active on the page. Although this made the key stroke listener functionality immediately available in IE it still failed to work with FireFox at all. I simply removed the wmode parameters all together from the object tag as well as from the attributes and the embed tag and all the sudden I had key stroke functionality in Firefox. My guess is that what is happening is that in FireFox Flash is listening for the key stroke, but if the wmode tag is there, the key board mapping is screwed up so the key listener fails silently. What is important to note is that this was on a US English mapped keyboard so the keyboard mapping problem may apply to all keyboard layouts! I was also using wmode = “opaque” so I dont’ think it is specific to the transparent mode.
Keyboard Mapping US English
Operating System Windows XP Professional Version 2002 SP2
Flash Player 9
[...] http://blog.headlondon.com/archives/no-wmode-please-were-british/ Posted in html, flash [...]
Wow, thanks for figuring this out. I spent ages on trying to figure out what exactly the problem is. I could hardly find any information on it. It’s suprising to see that this has not been dealt with by Adobe.
In my case it is for a facebook application where Facebook automatically sets the wmode value. The only way around it is, as far as I can see with the Keymapper. However what about if someone uses a US keyboard?
Thanks for posting this error. Has saved me loads of time!
Hi,
Have almost the same problem, on a DELL M4300 with XP Pro SP2 and Portuguese keyboard: the above mentionned symbol, the @, just doesn’t appear at all; I mean, the combination “Alt Gr 2″ gives nothing.
Does anyone know how to solve the problem? Please consider that I am a simple user, wouldn’t know where to exchange a code line so if you have a solution, please take me thru it step by step.
Thanks,
Dan
This isn’t just to do with Language!!!!
Hey we’re working with flash forms using a North American Keyboard layout and we have similar problems fixed by the removal of the wmode tag.
We wanted to put a key listener on page up, pagedown and enter and it worked in flash and in IE7 but not firefox.
Removing the wmode tag makes it work in firefox.
Thanks a lot!
Rob
[...] http://blog.headlondon.com/2006/06/02/no-... [...]
Hey all. I had been searching for the reason of and consequently a workaround for that silly situation for almost a week and found this post. I didn’t know the wmode had to do anything with it but apparently it is the reason itself and I don’t have a choice to disable it so I’m looking for a workaround. I’ll try the one presented above but there are more than a single character/glyph I need so I don’t think that will do the trick but anyway I’ll let you know if i can come up with an alternative solution. By the way I also discovered that motions in the swf movie slow down considerably when the wmode is set to transparent, which sucks but I don’t know what to do about it. Wish me luck
and best.
There is a javascript solution which solves this problem in firefox (but not for Safari/Chrome on a PC)
http://analogcode.com/p/JSTextReader/
The problem occurs with Spanish keyboards too.
Still looking for a workaround/fix.
In Firefox 3, with wmode=opaque enabled, I am not able to type ‘=’, when I try to type ‘=’ I get ‘+’.
[...] tvåan så funkar det. Läs även: http://flashmonk.blogspot.com/2007/08/wmode-key-flash-bug.html http://blog.headlondon.com/2006/06/02/no-wmode-please-were-british/ [...]
The same erros occurs with Spanish keymapping. You’ll get an “2” when trying to type an @.
Thank you all. This had driven me nuts. Why this bug has not been fixed after so long is a mystery.
I used a simpler version of Kevins workaround. This should be work with Spanish issues as well.
emailbox.onChanged = function(textfield_txt:TextField)
{
var stlen = textfield_txt.text.length;
if(Key.getAscii() == 34 || Key.getAscii() == 64 )
{
textfield_txt.text = textfield_txt.text.substring(0,stlen-1) + “@”;
}
};
The wmode bug doesn’t only cause this problem… its actually crashing a large app of ours in Windows Firefox. Remove the wmode setting and all runs sweetly. What a nightmare!
[...] http://blog.headlondon.com/2006/06/02/no-wmode-please-were-british/ [...]
This is insane, what the hell does the handling of a wmode have to do with handling keyboard input? How the can they couple those pieces of code? It doesn’t make any sense at all. No wonder this kind of bugs crop up if Firefox or Adobe screws their coding up so bad.
I wrote a fix for this in AS2.0 that works 100% for @ email fields:
http://pastebin.com/iBh4fKQB