Dan Olsavsky's Blog

Thursday, October 11, 2007

Drop Down Menus Over Flash

If you would like your drop down menus to display over any Flash elements on your page then this is for you.

1. Add the following parameter to the OBJECT tag:

<param name="wmode" value="transparent">

2. Add the following parameter to the EMBED tag:

wmode="transparent"

3. Add "z-index: 0;" via CSS to your DIV

Here is an example. I am using JavaScript here to avoid the active x control bug in ie6 and to keep my HTML code cleaner.

<!--Add this link to the head of your HTML doc-->

<script type="text/javascript" src="functions.js"></script>


<!--—Embed this JavaScript in the body of your HTML doc-->

<div id="mast" class="”flashContent”">
<script type="text/javascript">flash();</script>
</div>


// Save a new JavaScript file as "functions.js" – then add the JavaScript for your movie (note: it is all on one line and must remain this way)

function flash() {
document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="flash" align="middle" height="PIXELS" width="PIXELS"><param name="allowScriptAccess" value="sameDomain"><param name="movie" value="multimedia/FILENAME.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="multimedia/FILENAME.swf" wmode="transparent" quality="high" bgcolor="#ffffff" name="flash" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="PIXELS" width="PIXELS"></embed></object>');
}

/* CSS for class=”flashContent” */

.flashMovie {
z-index: 0;
}

posted by dano at 8:49 AM

0 Comments:

Post a Comment

<< Home

© Dan Olsavsky | 2004-2009. This site is optimized for viewing in Mozilla's Firefox. Some features may not appear in other internet browsers. Please note that I do not develop the content for the websites featured in my portfolio. I do however, work with some phenomenal writers that can get the job done. The Search Engine Optimization on most of the sites was done by a highly-skilled professional at Page 1 Solutions, LLC. Some of the websites have been edited aesthetically by other Website Design Professionals but I keep the Lightbox images original, because I like to keep it real. I am employed full-time, however... you too can retain my services at a very reasonable rate! A huge shout out to everybody who has helped me along the way and who continue to support me. You know who you are.. Click here to view the Sitemap or click here to Contact me.