Flash and dropdown menus
Published June 11th, 2010 under General
Aside from the known issues with flash, there is a major problem with the default setup of most flash objects which many people are unaware of.
A quick search through our support forum, will show up dozens of questions relating to Adobe Flash objects and dropdown menus appearing beneath them. The usual solution people look to as a solution, is to modify the z-index of either their menu, the flash object, or both. Unfortunately this only leads to dead-ends and confusion on the part of the site owner.
The solution thankfully, is relatively simple. All you need to do is to set the Flash object to “transparent”, and your dropdown menu will appear on top of the object instead of below it. I suspect Adobe added this behaviour intentionally as a way of hacking people’s sites into work as expected but has infuriated many web developers as this is not what would typically be expected for browser behaviour.
The solution
Add the following between your <object> tags:
[html]<param name="wmode" value="transparent" />[/html]
Add this in an <embed> tag:
[html]wmode="transparent"[/html]
Your code should now look something like this:
[html]
<object>
<param value="blabla.swf" / >
<param name="wmode" value="transparent" / >
<embed src="transparency.swf" wmode="transparent" type="application/x-shockwave-flash">
</embed>
</object>[/html]
Diletanti says:
But i have no embed or object tag with flash animation gallery on my site http://diletanti.co.cc
Read this please https://geek.hellyer.kiwi/forum/index.php?topic=1611.0
July 22, 2010 at 7:25 am # //
Ryan says:
If you don’t have an embed or object tag on your site, then you are presumably not experiencing this problem.
August 4, 2010 at 10:14 am # //
Victor Delta says:
Thanks for the useful solution to this problem. Curiously I get it when using IE based browsers but not when using Mozilla> I expect there is a good reason for this!
By the way, is there a typo in the above? Isn’t there a missing slash at the end of the param line?
August 17, 2010 at 9:58 am # //
Ryan says:
Thanks for the correction. Yes, there should be a slash near the end of the first param line. I’ll fix that right now.
August 26, 2010 at 5:36 am # //
Mark Breaux says:
FYI. This doesn’t fix the issue if you are using SWFobject 2.2 Do you know of another way?
December 3, 2010 at 12:22 pm # //
Ryan says:
I wasn’t aware of that problem. Do you have an example of this issue in action?
December 12, 2010 at 9:14 am # //