zoukankan      html  css  js  c++  java
  • flexpaper 背景色变化

    1、mxml文件头部:添加 backgroundAlpha="0"

    Flex代码  收藏代码
    1. <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"  
    2.                xmlns:mx="library://ns.adobe.com/flex/mx"  
    3.                xmlns:s="library://ns.adobe.com/flex/spark"  
    4.                width="510" height="510" <span style="color: #ff0000;">backgroundAlpha="0"</span>>  

    2、Html:<param>标签下添加 <param name=“wmode” value=“transparent”/>

    Html代码  收藏代码
    1. <noscript>  
    2.             <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="510" height="510" id="zhuanpan">  
    3.                 <param name="movie" value="zhuanpan.swf" />  
    4.                 <param name="quality" value="high" />  
    5.                 <param name="bgcolor" value="#ffffff" />  
    6.                 <param name="allowScriptAccess" value="sameDomain" />  
    7.                 <param name="allowFullScreen" value="true" />  
    8.         <span style="color: #ff0000;"><param name='wmode' value='transparent'></span>  
    9.                 <!--[if !IE]>-->  
    10.                 <object type="application/x-shockwave-flash" data="zhuanpan.swf" width="510" height="510">  
    11.                     <param name="quality" value="high" />  
    12.                     <param name="bgcolor" value="#ffffff" />  
    13.                     <param name="allowScriptAccess" value="sameDomain" />  
    14.                     <param name="allowFullScreen" value="true" />  
    15.             <span style="color: #ff0000;"><param name='wmode' value='transparent'/></span>  
    16.                 <!--<![endif]-->  
    17.                 <!--[if gte IE 6]>-->  
    18.                     <p>   
    19.                         Either scripts and active content are not permitted to run or Adobe Flash Player version  
    20.                         10.2.0 or greater is not installed.  
    21.                     </p>  
    22.                 <!--<![endif]-->  
    23.                     <a href="http://www.adobe.com/go/getflashplayer">  
    24.                         <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />  
    25.                     </a>  
    26.                 <!--[if !IE]>-->  
    27.                 </object>  
    28.                 <!--<![endif]-->  
    29.             </object>  
    30.         </noscript>  

    3、Html:<script>标签中 添加 params.wmode="transparent";

    Js代码  收藏代码
    1. <script type="text/javascript">  
    2.             // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection.   
    3.             var swfVersionStr = "10.2.0";  
    4.             // To use express install, set to playerProductInstall.swf, otherwise the empty string.   
    5.             var xiSwfUrlStr = "playerProductInstall.swf";  
    6.             var flashvars = {};  
    7.             var params = {};  
    8.             params.quality = "high";  
    9.             params.bgcolor = "#ffffff";  
    10.         <span style="color: #ff0000;">params.wmode="transparent";</span>  
    11.             params.allowscriptaccess = "sameDomain";  
    12.             params.allowfullscreen = "true";  
    13.             var attributes = {};  
    14.             attributes.id = "zhuanpan";  
    15.             attributes.name = "zhuanpan";  
    16.             attributes.align = "middle";  
    17.             swfobject.embedSWF(  
    18.                 "zhuanpan.swf""flashContent",   
    19.                 "510""510",   
    20.                 swfVersionStr, xiSwfUrlStr,   
    21.                 flashvars, params, attributes);  
    22.             // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.  
    23.             swfobject.createCSS("#flashContent""display:block;text-align:left;");  
    24.         </script>  

    注:

    透明功能主要是第2步中的设置。
    下面看一下backgroundAlpha对程序效果的影像:
    backgroundAlpha不为0时,在flashplayer中的效果

    backgroundAlpha不为0时,在web页面中的效果

     

    backgroundAlpha 为0时,在flashplayer中的效果

    backgroundAlpha为0时,在web页面中的效果

  • 相关阅读:
    企业架构-发布在线文档【企业架构框架-TOGAF v0.2.pdf】
    以后我的blog部分主题在其他地方写,留意者请继续关注!
    2010年3月blog汇总:企业架构、团队管理
    参加了两天QCon会议,你有什么感觉?
    DDD - 使用聚合(Aggregate)来设计类库
    发布【报表引擎设计.pdf】
    关心你的blog统计数据 给博客增加免费统计服务
    推荐:C2C文档销售与分享社区豆丁
    个人管理 - 后续的个人管理系列文章列表,大家一起来提提建议
    BABOK 需求获取(Elicitation)
  • 原文地址:https://www.cnblogs.com/weipeng/p/3714496.html
Copyright © 2011-2022 走看看