Flash Video als 2. Ebene unter [img]
stefande
- css
Hi,
folgendes Problem: Ich habe ein Bild, bei Klick verschwindet es und darunter taucht dann ein Youtube Video auf. Habs mit z-index gereglt.
Leider funktioniert z-index wohl nicht bei Flash. Warum? Und wie kann ich es regeln das das Video als 2. Ebene unter dem Bild ist.
hier mein Code:
<div id="div1" style="position:absolute;zIndex:20;">
<img onclick="if(document.all)document.all.div1.style.visibility='hidden';" src="lutz.jpg" alt="" border="0" width="280" height="172">
</div>
<div style="position:absolute;zIndex:-20;">
<object type="application/x-shockwave-flash" style="width:280px; height:172px;" data="http://www.youtube.com/watch?v=dBNVE147KE4&feature=rec-HM-rn">
<param name="movie" value="http://www.youtube.com/watch?v=dBNVE147KE4&feature=rec-HM-rn"></param>
</object>
</div>
Hi,
Leider funktioniert z-index wohl nicht bei Flash. Warum?
Weil Falsh sich per Default immer in den Vordergrund setzt.
Wenn man das verhindern will, muss man das wmode-Attribut bei der Einbindung nutzen - was aber auch wieder andere Nebenwirkungen hat.
Suche mal im Archiv danach.
MfG ChrisB
Habs jetzt. Aber leider nur im IE. Im Mozilla gehts nicht....Warum nicht?
<div id="div1" style="position:absolute;z-Index:15;">
<img onclick="if(document.all)document.all.div1.style.visibility='hidden';" src="lutz.jpg" alt="" border="0" width="280" height="172">
</div>
<div style="position:absolute;z-Index:10;">
<object type="application/x-shockwave-flash" style="width:280px; height:172px;" data="http://www.youtube-nocookie.com/v/pqgaIHBzou0">
<param name="movie" value="http://www.youtube-nocookie.com/v/pqgaIHBzou0"></param>
<param name="wmode" value="transparent"></param>
</object>
</div>
Ok habs mit
<img onclick="document.getElementById('div1').style.visibility='hidden';" src="lutz.jpg" alt="" border="0" width="280" height="172">
gelöst...