...

View Full Version : z-index and flash-banner



CaptainB
03-05-2009, 09:36 PM
Hey,

I have a problem with my flash banner. If I set its containing div with a z-index lower than my rest, it doesn't go underneath it. Is there some tricky trick that I'm unaware of with z-index and flash?

mwgriffin
03-05-2009, 10:44 PM
Yeah I've run across the same issues before. Z-index is tricky. Of course I'm assuming that you know that a lower z-index means that it will be farther back, as you've said. I personally don't know why this would be though, as it would make more sense if the lower the index the more on top an element would be. But I personally unfortunatly. Don't have any suggetions as I still haven't figured out to fix this flash issue. I would definatly be interested on how this is fixed. Anyone?

CaptainB
03-06-2009, 10:40 AM
I found a solution: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14201&sliceId=2

However, I use javascript to load the flash movie and swdobject. How would I then incoorporate it?

My code:

<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("flash/headermov.swf", "headermov", "900", "200", "9", "#000");
so.write("header"); //Div to write the flash content to
// ]]>
</script>

Need to incoorporate this:

To edit an existing HTML page, add the WMODE parameters to the HTML code.

Add the following parameter to the OBJECT tag:
<param name="wmode" value="transparent">

Add the following parameter to the EMBED tag:
wmode="transparent"

mwgriffin
03-06-2009, 11:57 AM
I think, and correct me if i'm wrong, that you have to add the parameter to the object tag. aka:




<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("flash/headermov.swf", "headermov", "900", "200", "9", "#000");
so.addParam('wmode','transparent');
so.write("header"); //Div to write the flash content to
// ]]>
</script>

CaptainB
03-06-2009, 04:48 PM
You were right - now it works and the flash is following the orders set with z-index! Thank you!

mwgriffin
03-06-2009, 08:56 PM
glad to help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum