JavaScript SWFObject:带有浏览器滚动条的全屏闪烁
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JavaScript SWFObject:带有浏览器滚动条的全屏闪烁相关的知识,希望对你有一定的参考价值。
<script type="text/javascript">
//<![CDATA[
var size = getViewportSize();
function getViewportSize()
{
var size = [0, 0];
if (typeof window.innerWidth != "undefined") {
size = [window.innerWidth, window.innerHeight];
}
else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
size = [document.documentElement.clientWidth, document.documentElement.clientHeight];
}
else {
size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight];
}
return size;
}
function createFullBrowserFlash()
{
swfobject.createCSS("html", "height:100%;");
swfobject.createCSS("body", "height:100%;");
swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:980px; min-height:553px;");
}
function setHeight( h )
{
if ( h < size[1] ) h = "100%";
var el = document.getElementById("container");
if ( h != "100%" ) el.style.height = h < 553 ? "553px" : h + "px";
else el.style.height = "100%";
}
var flashvars = { };
var params = { "allowscriptaccess": "samedomain" };
swfobject.embedSWF("main.swf", "content", "100%", "100%", "9.0.0", false, flashvars, params);
if (swfobject.hasFlashPlayerVersion("9.0.0")) {
swfobject.addDomLoadEvent( createFullBrowserFlash );
}
//]]>
</script>
以上是关于JavaScript SWFObject:带有浏览器滚动条的全屏闪烁的主要内容,如果未能解决你的问题,请参考以下文章
SWFObject是什么
如何防止 Javascript 菜单隐藏在 Flash 视频 (SWFObject) 下
SWFObject: Javascript Flash Player detection and embed script
没有 SWFObject.js 的 Javascript 到 Flash 通信
JavaScript 包含/实现SWFObject
JavaScript swfobject的