html设置flash满屏,Flash全屏功能测试

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();

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值