开发者

How to place an overlay DIV with opacity < 1 over a Flash object

开发者 https://www.devze.com 2023-02-22 10:00 出处:网络
We have a flash object and when we use blockUI or some other overlay div with opacity < 1, it doesn\'t make the flash area transparent. However, it do hides the flash object when opacity is 1, but

We have a flash object and when we use blockUI or some other overlay div with opacity < 1, it doesn't make the flash area transparent. However, it do hides the flash object when opacity is 1, but I want to have the overly div transparent which make the flash area transparent too like it doing for other HTML objects.

Is it a know issue/thing? Any workaround?

Here is the code expert:

<object width="100%" height="200" align="" id="charts" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" wmode="transparent"> 
<param value="/charts.swf?library_path=/charts_library&amp;xml_source=/chart&amp;" name="movie"> 
<param value="high" name="quality"> 
<param value="#E6E6E6" name="bgcolor"> 
<param value="transparent" name="wmode"> 
<embed width="100%" height="200" align="" salign="TL" scale="noscale" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" name="charts" bgcolor="#E6E6E6" quality="high" src="/charts.swf?library_path=/charts_library&amp;xml_source=/chart&amp;license="> 
</object>

For overlay div we are using jQuery.blockUI and FancyBox (when we need to some popup and block the UI). We also tried to overlay the flash object using a di开发者_JAVA百科v with z-index. It overlays and hides the flash when opacity is 1 but not when it's < 1.

Here is the screen shot:

http://www.4shared.com/photo/PO-Cb1bi/Flash_Overlay_Transparency.html


You need to set the wmode parameter of the flash object to "transparent".

//Article

http://kb2.adobe.com/cps/142/tn_14201.html

//Video tutorial

http://kb2.adobe.com/cps/524/cpsid_52418.html#flash


You need to add the wmode transparent to your <embed> tag as well as the object:

<embed wmode="transparent" ...>

This should fix your problem.


You need to add this parameter in your flash object.

<param name="wmode" value="opaque" />

Here are the details: http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/

0

精彩评论

暂无评论...
验证码 换一张
取 消