flash内容不仅仅适用于firefox

时间:2014-11-06 15:03:08

标签: javascript jquery flash

http://www.мультипак.org/lib/Multi_Pack/bin/

此闪光灯无处不在(歌剧,镀铬,野生动物园),但当我打开火狐闪光灯100%后无法正常工作时, (但在localhost工作)

<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="utf-8"/>
 <title>Multi_Puck</title>
 <meta name="description" content="" />

 <script src="js/swfobject.js"></script>
 <script>
  var flashvars = {
  };
  var params = {
   menu: "false",
   scale: "noScale",
   allowFullscreen: "true",
   allowScriptAccess: "always",
   wmode: "direct" // can cause issues with FP settings & webcam
  };
  var attributes = {
   id:"MultiPuck"
  };
  swfobject.embedSWF(
   "MultiPuck.swf", 
   "altContent", "100%", "100%", "10.0.0", 
   "expressInstall.swf", 
   flashvars, params, attributes);
 </script>
 <style>
  html, body { height:100%; overflow:hidden; }
  body { margin:0; }
 </style>
</head>
<body>
 <div id="altContent">
  <h1>Multi_Puck</h1>
  <p><a href="http://www.adobe.com/go/getflashplayer">Get Adobe Flash player</a></p>
 </div>
</body>
</html>

2 个答案:

答案 0 :(得分:3)

当我在firefox上用flash player调试版打开你的页面时,我遇到了这个安全错误(仅限firefox):

#2044: Unhandled securityError : text=Error #2048: Security sandbox violation : http://www.мультипак.org/lib/Multi_Pack/bin/MultiPuck.swf cannot load data from config.xml.
    at _XML_/loadXml()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\_XML_.as:34]
    at _XML_()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\_XML_.as:29]
    at Main/init()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Main.as:61]
    at flash.display::DisplayObjectContainer/addChild()
    at Preloader/startup()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:105]
    at Preloader/loadingFinished()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:99]
    at Preloader/checkFrame()[xxxxxxxxxxxx\Downloads\Multi_Puck\src\Preloader.as:85]

我使用'xxxxxxxxxxxx'更改了本地路径。

尝试添加crossdomain.xml并强制使用以下方法加载:

Security.loadPolicyFile("http://www.мультипак.org/crossdomain.xml")

有关crossdomain.xml的详细信息,请查看此处:Adobe : Cross-domain policy for Flash movies

要在浏览器中调试在线产品版本,可以在此处下载并安装Flash player调试版:FlashPlayer downloads

我希望这一切可以帮助您解决问题。

答案 1 :(得分:1)

仅使用绝对路径或本地路径,不应合并。这就是它显示安全错误的原因