Generally speaking, Flash and cross browser deployment go hand in hand… not so for me over the last week. I spent 4 days doing some work for an Agency in London, and I encountered 3 browser related Flash “bugs”.
1. The stage appears to initialise quicker in Firefox and Chrome on Windows than it does in IE. I was working with some code that I hadn’t written (gotta throw a disclaimer in there ;-), and the assumption the code was making was that the stage dimensions were available on Frame 1 of the actionscript’s Document Class. IE wasn’t having a bar of this assumption, instead returning 0 for both the width and height, which was essentially causing the rest of the application to render off screen. Simple remedy was to add an ENTER_FRAME listener and wait for the dimensions to be greater than 0. Notch that one up to utilising someone else’s code that wasn’t really tested properly across browser… but that’s kinda the point of Flash right?
2. The MouseEvent.MOUSEWHEEL event doesn’t fire in IE 8. It does however work in IE6 and 7. I performed the obligatory Google searches for people that were experiencing the same issue, and only really managed to see results related to Mac and the scrollwheel (which can be remedied using swfmacmousewheel). Does anyone have the mouse scroll wheel working in IE8?
3. ExternalInterface relies on the swf actually being visible on screen in Firefox and Chrome. In IE, setting the div that contains the Flash content to display:none still allows a javascript function to communicate with the swf. In Firefox, when the div is hidden, the swf somehow ceases to exist. My hunch is that this is to with swfobject… This situation can be remedied by moving the swf off of the browsers viewport (ie. position:absolute; left:-1000; for a movie that’s 1000 pixels wide). Not sure of the ramifications this fix would have on CPU usage though (the new Flash Player 10.1 made changes in this area (see Periodic timer)).
Feeling your pain (on points 1 and 2)
Had issue 1 a while ago myself (ie6 at the time)
http://blog.creacog.co.uk/2007/12/02/strange-stage-size-problem-but-only-in-ie6/
It’s also covered in SWFObject FAQ 21
http://code.google.com/p/swfobject/wiki/faq
Unsure how ‘under the control’ of flash player this issue is or how much it is down to the browser embed process.
On point 2 There’s been a lot effort put into supporting touch gestures, but I still get frustrated at how poorly supported the far more basic mouse wheel / track-ball / track-pad / magic mouse gestures seem to be. I refer to FP-1262 that you might consider adding comments to / voting for…
http://blog.creacog.co.uk/2010/02/09/flash-in-the-pan/