我在 Flash 对象(flex-3)的顶部有一个 HTML div。它在 IE-8 中出现。但它不会出现在 Chrome/Firefox 上。问题是当我打开这两个浏览器的开发者工具时,它就来了。
所以问题是没有开发者工具它不会出现在屏幕上。
我也使用了 Z-index、display:block、param name="wmode" value="opaque"。
<script>
function setupDivDimensions(){
var bodyElement = document.getElementsByTagName('body')[0];
var bodyW = bodyElement.clientWidth;
var bodyH = bodyElement.clientHeight;
document.getElementById('flexContainerMain').setAttribute("style","position:relative;width:"+bodyW+";height:"+bodyH);
document.getElementById('flexContainerMain').style.width=bodyW;
document.getElementById('flexContainerMain').style.height=bodyH;
document.getElementById('uam_boxes').setAttribute("style","z-index:3;display:block;");
document.getElementById('flexContainer').setAttribute("style","z-index:1;position:absolute;top:0;left:0;display:block;width:"+bodyW+";height:"+bodyH);
document.getElementById('flexContainer').style.width=bodyW;
document.getElementById('flexContainer').style.height=bodyH;
}
</script>
<body onload="setupDivDimensions();">
<input type="hidden" id="globalLogoutUrl" name="globalLogoutUrl"
value="/logout/page/link/goes/here" />
<input type="hidden" id="appLogoutUrl" name="appLogoutUrl" value="<%=request.getContextPath()%>/Logout" />
<f:verbatim>
<div id="flexContainerMain">
<div id="uam_boxes"></div>
<div id="flexContainer"><Object id="flex" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%"
height="100%" codebase="https://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="<%=request.getContextPath()%>/flex/MyFlashPage.swf" />
<embed src="<%=request.getContextPath()%>/flex/MyFlashPage.swf" width="100%" height="100%" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="wmode" value="opaque" />
<param name='flashVars'
value='userName=<h:outputText value="#{USER_OBJECT_KEY.userName}"/>&selMenuId=<h:outputText value="#{menuController.selectedMenuItem.menuId}"/>&selMenuTitle=<h:outputText value="#{menuController.selectedMenuItem.title}"/>' />
</object></div>
</div>
<div style="display:none">
<form name="redirection" action="" method="post" width="0" height="0"><f:verbatim>
<a style="margin-right:20px;" class="globalLinkBranding"
onmouseover="isStatusAvail = false;window.status='Logout';return true" onmouseout="isStatusAvail = true;"
id="uam_modal"> Logout </a>
</form>
</div>
</f:verbatim>
</body>