网页中flashwmode属性你会用吗?

上传人:tang****xu4 文档编号:141738726 上传时间:2020-08-12 格式:DOCX 页数:2 大小:31.17KB
返回 下载 相关 举报
网页中flashwmode属性你会用吗?_第1页
第1页 / 共2页
网页中flashwmode属性你会用吗?_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《网页中flashwmode属性你会用吗?》由会员分享,可在线阅读,更多相关《网页中flashwmode属性你会用吗?(2页珍藏版)》请在金锄头文库上搜索。

1、在做web开发中可能会遇到 flash遮挡页面中元素的情况,无论怎么设置 flash容器和层的深度(z-index)也无济于事,现有的解决方案是在插入flash的embed或object标签中加入” wmode ” 属性并设置为 wmode= “ tran spare nt” 或” opaque,但 wmode 属性至U底是什么 意义,为什么可以解在flash标签中<param name= ” wmode value=xxxx>Window在 Web页上用影片自己的矩形窗口来播放应用程序,并且始终位于最顶层。Opaque显示页面上位于它后面的内容。Transparent使HTML页

2、的背景可以透过应用程序的所有透明部分显示出来,并且可 能会降低动画性能。注:Opaque和Transparent都可与 HTML 层交互,从而允许SWF文件上方的层遮蔽应用程序。这两种选项之间的差异在于Transparent允许透明,因此,如果SWF文件的某一部分是透明的,则 SWF文件下方的 HTML层可以透过该部分显示出来,而opaque则不会显示。也就是如果发生 FLASH遮盖DIV层的情况,就必须要改 wmode属性为Tran spare nt” 在做web开发中可能会遇到 flash遮挡页面中元素的情况,无论怎么设置flash容器和层的深度(z-index)也无济于事,现有的解决方案

3、是在插入flash的embed或object标签中加入” wmode ” 属性并设置为 wmode= “ tran spare nt” 或” opaque,但 wmode 属性至U底是什么 意义,为什么可以解决这个问题呢?win dow mode(wmode)wmode即窗口模式总共有三种,看看当年Macromedia官方的说法:Window: Use theWindow value to play a Flash Player movie in its own recta ngular win dow on a web page. This is the default value for

4、wmode and it works the way the classic Flash Player works. This n ormally provides the fastest animation performanee. Opaque: By using the Opaque value you can use JavaScript to move or resize movies that don t n eed a tran spare nt backgro und. Opaque mode makes the movie hide everyth ing beh ind i

5、t on the page. Additi on ally, opaque mode moves eleme nts beh ind Flash movies (for example, with dyn amic HTML) to preve nt them from show ing through. Tran spare nt: Tran spare nt mode allows the backgro und of the HTML page, or the DHTML layer undern eath the Flash movie or layer, to show throug

6、h all the tran spare nt porti ons of the movie. This allows you to overlap the movie with other elements of the HTML page. Ani mati on performa nee might be slower whe n you use this value.window 模式默认情况下的显示模式,在这种模式下flash player有自己的窗口句柄,这就意味着flash影片是存在于 Windows中的一个显示实例,并且是在浏览器核心显示窗口之上的,所以flash只是貌似显示在

7、浏览器中,但这也是flash最快最有效率的渲染模式。由于他是独立于浏览器的HTML渲染表面,这就导致默认显示方式下flash总是会遮住位置与他重合的所有DHTML 层。但是大多数苹果电脑浏览器会允许DHTML层显示在flash之上,但当flash影片播放时会出现比较诡异的现象,比如DHTML层像被flash刮掉一块一样显示异常。Opaque模式这是一种无窗口模式,在这种情况下flash player没有自己的窗口句柄,这就需要浏览器需要告诉flash player在浏览器的渲染表面绘制的时间和位置。这时flash影片就不会在高于浏览器HTML渲染表面而是与其他元素一样在同一个页面上,因此你就可

8、以使用z-i ndex值来控制DHTML元素是遮盖flash或者被遮盖。Tran spare nt 模式透明模式,在这种模式下 flash player会将stage的背景色alpha值将为0并且只会绘制 stage上真实可见的对象,同样你也可以使用z-index来控制flash影片的深度值,但是与Opaque模式不同的是这样做会降低flash影片的回放效果,而且在9.0.115之前的flash player版本设置 wmode= ” opaque ”或” tran spare nt” 会导致全屏模式失效。了解了各种模式的实现方式和意义在以后的开发中就可以按照具体情况选择设置 wmode属性的值了。

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号