Flash电影上的javascript对话框 [英] javascript dialog over a flash movie
问题描述
在Google Chrome中,它的效果很好,但是其他浏览器会发生问题:
-
使用Internet Explorer,对话框打开,但当我点击关闭按钮对话框停留在那里,奇怪的是,如果我最小化IE按钮并最大化它,对话框将消失。
-
使用Firefox,打开触发对话框时,对话框窗口不会显示任何内容,但有些损坏的图形,但如果我移动鼠标,则会显示内容。
可能会导致此问题?我该怎么解决?
以下是源代码,网站不在任何网站上,因此我无法直接显示:
<!DOCTYPE html PUBLIC
- // W3C // DTD XHTML 1.0过渡// EN
http ://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>
< html>
< head>
< meta http-equiv =Content-Typecontent =text / html; charset = utf-8/>
< link type =text / csshref =/ media / style.css =stylesheet/>
< link rel =stylesheethref =/ media / nyroModal.full.csstype =text / cssmedia =screen/> < script type =text / javascriptsrc =/ media / jquery.js>< / script>
< script language =javascript> AC_FL_RunContent = 0;< / script>
< script type =text / javascriptsrc =/ media / AC_RunActiveContent.js>< / script>
< script type =text / javascriptsrc =/ media / jquery.nyroModal-1.5.2.pack.js>< / script>
< script type =text / javascript>
function showItem(i,x){
var myurl =/ item /?i =+ i;
$ .nyroModalManual({url:myurl,title:x});
}
< / script>
< / head>
< body bgcolor =#000000>电影中使用的
<! - url - >
<! - 电影中使用的文字 - >
<! - 从url =(0013)保存:internet - >
< div STYLE =z-index:1;>< center>
< script language =javascript>
if(AC_FL_RunContent == 0){
alert(此页面需要AC_RunActiveContent.js);
} else {
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0, 0,0',
'width','100%',
'height','600',
'src','/ media / preview',
'质量,高,
'pluginspage','http://www.macromedia.com/go/getflashplayer',
'align','middle',
'play' ,'true',
'loop','true',
'scale','noScale',
'wmode','transparent',
'devicefont' false',
'id','preview',
'bgcolor','#2e2e2e',
'name','preview',
'menu' ',
'allowFullScreen','false',
'allowScriptAccess','sameDomain',
'电影','/ media / preview',
'salign',''
); // end AC code
}
< / script>
< noscript>
< object classid =clsid:d27cdb6e-ae6d-11cf-96b8-444553540000codebase =http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8 ,0,0,0width =1024height =850id =previewalign =middle>
< param name =allowScriptAccessvalue =sameDomain/>
< param name =allowFullScreenvalue =false/>
< param name =movievalue =/ media / preview.swf/>< param name =qualityvalue =high/>< param name =bgcolor =#000000/> < embed src =/ media // media / preview.swfquality =highbgcolor =#000000width =100%height =850name =previewalign =middleallowScriptAccess = sameDomainallowFullScreen =falsetype =application / x-shockwave-flashpluginspage =http://www.macromedia.com/go/getflashplayer/>
< / object>
< / noscript>
< / center>
< / div>
< / body>
< / html>
透明对此不起作用。为了在Flash上显示HTML,您需要使用 wmode =opaque
显示您的电影。
另外,为电影设置CSS zIndex属性为0,而在某些浏览器中,1000(或任何高于0)的任何东西都可以帮助您。
I have a such system: When the mainsite opens, A flash image gallery appears, when the user clicks on an image, using the Flash's "ExternalInterface.call" function, I call a javascript function that opens a java dialog modal named nyromodal (which fetches raw HTML data via ajax from another page inside the dialog box) on the flash movie. And thats when problem happens:
In Google Chrome it works well as intended, however issues happen with other browsers:
With internet explorer, dialog opens but when I click the "close" button the dialog stays there, weirdly if I minimize the IE button and maximize it, the dialog dissapears.
With Firefox, while opening the triggered dialog, dialog windows displays nothing but some corrupted graphics but if I move my mouse, it shows the contents.
What can cause this problem? How can I fix it ?
Here is the source code, site is not up on anywebsite thus I am not able to show it directly:
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" href="/media/style.css" rel="stylesheet" />
<link rel="stylesheet" href="/media/nyroModal.full.css" type="text/css" media="screen" /> <script type="text/javascript" src="/media/jquery.js"></script>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script type="text/javascript" src="/media/AC_RunActiveContent.js"></script>
<script type="text/javascript" src="/media/jquery.nyroModal-1.5.2.pack.js"></script>
<script type="text/javascript">
function showItem(i,x){
var myurl = "/item/?i="+i;
$.nyroModalManual({url:myurl,title:x});
}
</script>
</head>
<body bgcolor="#000000">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<div STYLE="z-index: 1;"><center>
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
'width', '100%',
'height', '600',
'src', '/media/preview',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'noScale',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'preview',
'bgcolor', '#2e2e2e',
'name', 'preview',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', '/media/preview',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1024" height="850" id="preview" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="/media/preview.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /> <embed src="/media//media/preview.swf" quality="high" bgcolor="#000000" width="100%" height="850" name="preview" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</center>
</div>
</body>
</html>
Transparent won't work for this. In order to show HTML over Flash, you need to show your movie with wmode="opaque"
.
Also, setting CSS zIndex property to 0 for the movie and 1000 (or anything above 0) to the popup will help in some browsers.
这篇关于Flash电影上的javascript对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!