在Flash影片的JavaScript对话框 [英] javascript dialog over a flash movie
问题描述
您好 我有一个这样的系统:当mainsite打开,闪存图片库出现,当用户点击的图像上,使用Flash的ExternalInterface.call功能,我称之为打开一个名为nyromodal java的对话模式(一个JavaScript函数获取的flash影片通过从对话框内的另一个页面的ajax原始的HTML数据)。而这就是当问题发生:
在谷歌浏览器它的工作原理以及预期,但问题发生与其他浏览器:
-
对于Internet Explorer,打开对话框但是当我点击关闭按钮关闭对话框在那里停留,古怪,如果我最小化IE浏览器按钮,并最大限度地发挥它的对话框自败。
-
使用火狐,在打开触发对话,对话窗口会显示什么,但一些损坏的图形,但如果我将我的鼠标,它显示的内容。
什么会导致这个问题?我该如何解决这个问题?
下面是源$ C $ C,本站不起来anywebsite因此我不能将它直接显示:
<!DOCTYPE HTML PUBLIC
- // W3C // DTD XHTML 1.0过渡// EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< HTML>
< HEAD>
< META HTTP-当量=Content-Type的CONTENT =text / html的;字符集= UTF-8/>
<链接类型=文/ CSS的href =/媒体/ style.css的相对=样式/>
<链接相对=样式表的href =/媒体/ nyroModal.full.css类型=文本/ CSS媒体=屏幕/> <脚本类型=文/ JavaScript的SRC =/媒体/ jquery.js和>< / SCRIPT>
< SCRIPT LANGUAGE =JavaScript的> AC_FL_RunContent = 0;< / SCRIPT>
<脚本类型=文/ JavaScript的SRC =/媒体/ AC_RunActiveContent.js>< / SCRIPT>
<脚本类型=文/ JavaScript的SRC =/媒体/ jquery.nyroModal-1.5.2.pack.js>< / SCRIPT>
<脚本类型=文/ JavaScript的>
功能showItem(I,X){
VAR myurl =/项目/我=?+我;
$ .nyroModalManual(网址:{url:myurl,标题:X});
}
< / SCRIPT>
< /头>
<身体BGCOLOR =#000000>
< - !网址在电影中使用 - >
<! - 在电影中使用的文字 - >
< - 免于URL =(0013)约:互联网 - >
< DIV STYLE =的z-index:1;><中心>
< SCRIPT LANGUAGE =JavaScript的>
如果(AC_FL_RunContent == 0){
警报(此网页需要AC_RunActiveContent.js。);
} 其他 {
AC_FL_RunContent(
codeBase的,http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0,
宽度,100%,
'高','600',
'src'中,'/媒体/ preVIEW',
品质,高,
'PLUGINSPAGE','http://www.macromedia.com/go/getflashplayer',
对齐,中等,
'玩','真',
'环','真',
规模,为noScale,
'WMODE','透明',
devicefont','假',
'ID','preVIEW',
'BGCOLOR','#2e2e2e',
'名','preVIEW',
菜单,真,
的allowFullScreen','假',
'的allowScriptAccess','导航特殊',
电影,/媒体/ preVIEW',
'salign',''
); //结束AC code
}
< / SCRIPT>
< NOSCRIPT>
<对象的classid =CLSID:D27CDB6E-AE6D-11CF-96b8-444553540000codeBase类=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8, 0,0,0WIDTH =1024高度=850ID =preVIEWALIGN =中间>
< PARAM NAME =allowScriptAccess的值=导航特殊/>
< PARAM NAME =的allowFullScreen值=FALSE/>
< PARAM NAME =电影值=/媒体/ preview.swf/>< PARAM NAME =质量值=高/>< PARAM NAME =BGCOLOR值= #000000/> <嵌入SRC =/媒体//媒体/ preview.swf品质=高BGCOLOR =#000000WIDTH =100%高度=850NAME =preVIEW对齐=中间的allowScriptAccess =导航特殊的allowFullScreen =FALSE类型=应用程序/ x-冲击波闪光PLUGINSPAGE =http://www.macromedia.com/go/getflashplayer/>
&所述; /对象>
< / NOSCRIPT>
< /中心>
< / DIV>
< /身体GT;
< / HTML>
透明不适用于这项工作。为了在Flash中显示HTML,你需要证明你的电影有的wmode =不透明
。
此外,设置CSS zIndex属性为0,为电影和1000(或任何高于0)的弹出窗口将在某些浏览器帮助。
Hello 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屋!