1、mxml文件头部:添加 backgroundAlpha="0"
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
width="510" height="510" backgroundAlpha="0">
2、Html:<param>标签下添加 <param name=“wmode” value=“transparent”/>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="510" height="510" id="zhuanpan">
<param name="movie" value="zhuanpan.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name='wmode' value='transparent'>
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="zhuanpan.swf" width="510" height="510">
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<param name='wmode' value='transparent'/>
<!--<![endif]-->
<!--[if gte IE 6]>-->
<p>
Either scripts and active content are not permitted to run or Adobe Flash Player version
10.2.0 or greater is not installed.
</p>
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</noscript>
3、Html:<script>标签中 添加 params.wmode="transparent";
<script type="text/javascript">
// For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.
var swfVersionStr = "10.2.0";
// To use express install, set to playerProductInstall.swf, otherwise the empty string.
var xiSwfUrlStr = "playerProductInstall.swf";
var flashvars = {};
var params = {};
params.quality = "high";
params.bgcolor = "#ffffff";
params.wmode="transparent";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "zhuanpan";
attributes.name = "zhuanpan";
attributes.align = "middle";
swfobject.embedSWF(
"zhuanpan.swf", "flashContent",
"510", "510",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
// JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>
注:
透明功能主要是第2步中的设置。
下面看一下backgroundAlpha对程序效果的影像:
backgroundAlpha不为0时,在flashplayer中的效果
backgroundAlpha不为0时,在web页面中的效果
backgroundAlpha 为0时,在flashplayer中的效果
backgroundAlpha为0时,在web页面中的效果
分享到:
相关推荐
最近Flex项目中需要保存背景为透明的截图,需要用到PngEncoder类。
12个Flex常用功能代码 1、复制内容到系统剪贴板 ...6、设置Alert 窗口的背景为透明 7、取随机颜色 8、清除子串左侧空格 9、清除字串右侧空格 10、清除字串左右的空格 11、 获取数据类型 12、生成随机字符串
flex一个托盘加透明背景和不规则窗口的整理示例. flex一个托盘加透明背景和不规则窗口的整理示例
不透明度:.3; } img {border-radius:20px; } .judul {职位:固定; 对:0; 左:0; } .jud {margin-left:-20px; 右边距:-20px; margin-top:-30px; padding-top:120px; 背景颜色:灰色; } .toggle {display...
aplha:透明度,0-1之间的小数,值越大,不透明度越高 5.#rgb 16位数字 :0-9和a-f 2.尺寸属性 1.作用 改变元素的宽度和高度 2.语法 width:宽度 取值:px % min-width:最小宽度 max-width:最大宽度 height...
然后将左右两个透明背景的元素使用absolute覆盖在中间元素的左右边框上,实现视觉上的等高效果 [注意]左右两侧元素高度不能大于中间元素高度,否则无法撑开容器高度 CSS Code复制内容到剪贴板 <style>
在转盘顶部添加透明容器,在黑暗模式下会变得不透明(在悬停时会变得模糊?悬停时会变得缩放) 在轮播字幕后面添加渐变Alpha背景 用红色写“ Anatole” 结构指导: : Flex显示帮助: : 暗模式帮助: : 网址: :...
emWin 图形库 图形用户界面 版本 5.12 手册修订版 0 emWin V5.12 用户参考手册 © 1997 - 2011 SEGGER Microcontroller GmbH & Co....9 1 emWin 简介...................................................................
11.1.2位置、尺寸、透明度与可见性 227 11.1.3缩放与旋转 228 11.1.4坐标体系 231 11.1.5背景色 232 11.1.6区域与范围 233 11.1.7色彩调整 235 11.1.8遮罩 236 11.1.9位图缓存 237 11.1.10混合模式 238 11.2舞台对象...