Flash全屏功能测试
Flash全屏功能测试
在线测试页面: http://www.klstudio.com/demo/as/fullscreen/fullscreen.html
相关资料文件: http://www.klstudio.com/demo/as/fullscreen/fullscreen.rar
<div id="flashcontent"></div> <script language="javascript" src="js/swfobject.js"></script> <script language="JavaScript"> var orginFlash = {init:false,isFullScreen:false,position:"",top:"",left:"",width:"",height:""}; function writeFlash(){ var so = new SWFObject("fullscreen.swf", "fplayer", "100%", "100%", 8, "#FFFFFF"); so.addParam("quality", "high"); so.addParam("swLiveConnect", "true"); so.addParam("menu", "false"); so.addParam("allowScriptAccess", "sameDomain"); so.addParam("allowFullScreen", "true"); so.write("flashcontent"); } function getScreenSize(){ var w = 0; var h = 0; if( typeof( window.innerWidth ) == 'number' ) { w = window.innerWidth; h = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { w = document.documentElement.clientWidth; h = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { w = document.body.clientWidth; h = document.body.clientHeight; } return {width:w,height:h}; } function fullScreen(){ if(!orginFlash.init){ orginFlash.position = document.getElementById("flashcontent").style.position; orginFlash.top = document.getElementById("flashcontent").style.top; orginFlash.left = document.getElementById("flashcontent").style.left; orginFlash.width = document.getElementById("flashcontent").style.width; orginFlash.height = document.getElementById("flashcontent").style.height; } orginFlash.init = true; orginFlash.isFullScreen = true; var screenSize = getScreenSize(); try{ document.getElementById("flashcontent").style.position = "absolute"; document.getElementById("flashcontent").style.top = "0px"; document.getElementById("flashcontent").style.left = "0px"; document.getElementById("flashcontent").style.width = screenSize.width +"px"; document.getElementById("flashcontent").style.height = screenSize.height +"px"; document.body.style.overflow="hidden"; window.scrollTo(0,0); }catch(e){ } } function normal(){ if(orginFlash.init){ orginFlash.isFullScreen = false; try{ document.getElementById("flashcontent").style.position = orginFlash.position; document.getElementById("flashcontent").style.top = orginFlash.top; document.getElementById("flashcontent").style.left = orginFlash.left; document.getElementById("flashcontent").style.width = orginFlash.width; document.getElementById("flashcontent").style.height = orginFlash.height; document.body.style.overflow="auto"; }catch(e){ } } } function reSize(){ if(orginFlash.isFullScreen){ fullScreen(); } } window.onresize = reSize; writeFlash(); </script> |
P.S.
1、flash全屏功能代码部分参考网上资料。
2、flash全屏功能在IE6以上,flash player 7.0以上 浏览器环境中测试可以运行!
3、flash全屏功能通过两种方式实现,flash player版本号在9.0.18.60以上 是通过flash 9内部代码实现的,而低于这个版本的则是通过js + div来实现的!
4、通过flash 9新功能来实现全屏技术要注意以下几点:
a、flash player版本必须是 9.0.18.60或更高版本;
b、调用全屏功能代码需通过触发事件才可以运行的,如onPress,onRelease事件;
c、在插入html 代码时需设置<param name="allowFullScreen" value="true" />;
d、经多次研究发现,如 html代码设置成<param name="wmode" value="opaque" />或<param name="wmode" value="transparent" />时,则全屏功能无效!也就是说只有flash窗口模块设置为window时,全屏功能才有效(这个算是我的独家发现吧)!
Flash全屏功能测试相关推荐
- Flash 全屏代码
FLASH退出代码 代码如下 复制代码 on(release){ fscommand("quit",true) } 加在按钮中! ------------------------ ...
- flash全屏显示和退出代码
FLASH退出代码 on(release){ fscommand("quit",true) } 加在按钮中! ----------------------------------- ...
- Flash全屏播放外部多个Flv视频并且按键进行切换+全屏播放外部Flv视频+指定元件播放外部Flv视频(非全屏)(可以作为遮罩来播放)
目录 一.目的: 1.Flash全屏播放外部多个Flv视频并且按键进行切换+全屏播放外部Flv视频+指定元件播放外部Flv视频(非全屏),所以将其记录下来 二.参考: 1.[AS3编程教学]如何加载并 ...
- FLASH全屏,左右侧,闪烁广告及对错觉的代码补充.
<!--焦点图开始--> <script type="text/javascript"> <!-- var focus_width=250 ...
- html设置flash满屏,在网页中实现flash全屏的几种方法
方法(一) (比较简单) 1.启动我们的flash软件,并打开你要放到网页内的flash源文件. 2.选择"文件" 菜单从中选择"文件设置"在出现的对话框中选择 ...
- flash全屏显示代码
1.不用浏览器直接用FLASH播放器播放的类型: A.不显示FLASH播放器菜单栏的全屏(类似屏保效果),在第一帧处的Actions用FS Command 命令, 在For standalone pl ...
- Flowplayer播放器flash全屏播放器带播放按钮
Flowplayer 是一个开源(GPL 3的)WEB视频播放器.您可以将该播放器嵌入您的网页中,如果您是开发人员,您还可以自由定制和配置播放器相关参数以达到您要的播放效果.本文主要介绍Flowpla ...
- flash全屏输入模式
params.allowscriptaccess = "sameDomain"; params.allowfullscreen = "true"; params ...
- flash flash页面的的全屏展示
flash播放器显示全屏 as2 fscommand("fullscreen", "true"); as3 stage.displayState = Stage ...
最新文章
- 实验6-选第K小元素
- 面试常考:bitmap判断其中是否有相同元素
- 016_SpringBoot整合MyBatis
- 搭建prometheus+grafana监控系统
- 税收征收管理法律制度
- 5道Python函数练习
- php fpm www.conf,PHP7中php.ini、php-fpm和www.conf 配置
- 【数据结构与算法】实验 模拟FIFO网络打印机
- Dubbo与Spring Cloud
- 3ds max sdk导出插件编写的心得
- 叉乘与空间曲线的切向量
- 十一、非参数检验:使用python进行卡方两样本独立性检验
- NFT+DeFi =NFTFI
- springboot项目中redis客户端(Jedis、Lettuce、Redisson)
- SAP中SD交货与WM下架功能的集成应用
- php 快递单号生成规则,Thinkphp 生成订单号小案例
- NHANES数据库数据下载
- 深圳地铁远期规划20条线路图首发
- Data Protector
- VS2013以上版本加载VisionPro控件的方法
热门文章
- ubuntu安装I219-V网卡驱动 连接有线网络
- python应用如何实现升级_一种基于Python实现BMC批量升级的方法与流程
- 谷歌中国算法比赛解题报告 APAC2015C
- 计算COCO数据格式下每个类别的bbox的AP和Recall
- RF-常用关键字-Create List
- klee2.3 安装教程1-2
- linux unix shell programming,UNIX Shell Programming, 4th Edition
- 修改Mysql默认端口的方法
- 车载以太网之DoIP协议_第一篇
- debug、masm和link的安装配置