Flash全屏功能测试

发表于:2014-7-23 10:09

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:chen eric    来源:51Testing软件测试网采编

  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();
21/212>
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号