We 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:
  1. <embed type="application/x-shockwave-flash" src="flash/movie.swf?id=0" id="pimp" name="movie" quality="high" menu="false" wmode="transparent" height="485" width="569"></embed>

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?


17 Responses to “No wmode please, we’re British! AKA the @ key flash bug”  

  1. 1 Tom Boltwood

    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.

  2. 2 rdas7

    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!

  3. 3 Ashry

    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 ò

  4. 4 Lars

    ” 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.

  5. 5 Mark

    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?

  6. 6 Simon

    The same erros occurs with German keymapping. You’ll get an “q” when trying to type an @.

  7. 7 Ronny

    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.

  8. 8 d_cpher

    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 :-?

  9. 9 Phil

    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

  10. 10 5ive

    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.

  11. 11 Luc

    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.

  12. 12 Kevin

    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.

  13. 13 Garth Gerstein

    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

  14. 14 Jeremy

    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!

  15. 15 Dan

    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

  16. 16 Phasefire

    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

  1. 1 Numiko Labs » firefox/flash @ " swap bug


Leave a Reply