Flash全屏功能测试

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

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

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

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时,全屏功能才有效(这个算是我的独家发现吧)!
22/2<12
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

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

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

沪ICP备05003035号

沪公网安备 31010102002173号