Good Manners for Adobe Flash on Linux

Today, I had to deal with some badly behaving Flash content. The debugging process involved some extensive use of google and brought out a few interesting facts, which I thought would be good to be put together into a coherent story.

Webpages that embed Flash together with other layers of Web page content generally suck – in particular on Linux. It’s not the Web design that sucks – in fact: being able to use “depth” in a Web page is actually really nice for fitting more content on a page without making it too crowded (or hammering those flash ads at us – sigh).

Indeed, it is the technology that sucks because Flash on Linux doesn’t do what it’s supposed to do. Flash misbehaves on Linux by being bullish and always trying to stay dominant in the foreground over the top of DHTML content, even though being told not to. Don’t be prejudiced though: it’s not Adobe’s fault – or at least “not only”.

Before we try to teach Flash good manners, let’s first understand the problem.

When you embed an Adobe Flash 9 swf file in a Web page, Adobe provides a parameter called “wmode” (windowless mode), through which Flash is being told to be either “transparent” or “opaque”, either of which will prevent a Flash from playing in the topmost layer and allow you to adjust the layering of the movie within other layers of the HTML document. Layering in HTML is done by using the z-index.

Now, using wmode and “transparent” teaches Flash good manners on most operating systems. However, when the Flash ends up on a Linux computer, it’s old dominant personality returns and it turns evil again.

Yes, it is a bug. However, it is quite an interesting and long-standing bug – and longer-standing in Mozilla than other Linux Web Browsers, too.

Here is the story: On the 12th April 2002, Braden registered Bug 7189 with Mozilla about window-less plugin support on X. It was soon established that in principle window-less support is possible on Linux and the bug was re-focused on Flash. It turned out that multiple levels of fixes were necessary to get this working: at first, X needed window-less plugin support – a patch to fix this was provided by Dec 2004 by Pete Collins. Next thing necessary was support by Adobe to have an active “wmode” parameter, which was provided by end 2006. In April 2007 finally there was a first patch for Mozilla. A later patch was finally applied to trunk on July,2nd 2007. W00t!!

So, while we are all waiting for this patch to make it into Firefox and Linux distributions, to finally end up on our Desktop and make Flash behave, there is indeed a way for keen Web developers around this problem. And I can’t believe I’m actually going to say this: iFrames were the answer to our problem in my July’s blog post – and iFrames are again the answer here. Evil, detested, but oh so useful iFrames. Who would have thought…

6 thoughts on “Good Manners for Adobe Flash on Linux

  1. Another related issue just turned up: When you are trying to overlay a div on top of an active flash player in Firefox on the Mac, the active bit continues to put itself in front of the overlay (though not in front of a flash inside the overlay). This does not happen in Safari on the Mac though.

  2. With Adobe and Mozilla both having released major new versions that don’t fix these issues it looks like we’re in for another 2+ year release cycle before there is any chance of this being fixed.

    Shame on you Adobe, Shame on you Mozilla. You’re both pathetic.

  3. I run Debian testing 32 bits with iceweasel and had problems with flash movies covering menus. I’ve installed “install_flash_player_10_linux.tar.gz” from adobe. Now it’s working!

Comments are closed.