Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Chrome中的SWF沙盒冲突错误#2060_Javascript_Actionscript 3_Google Chrome_Flash - Fatal编程技术网

Javascript Chrome中的SWF沙盒冲突错误#2060

Javascript Chrome中的SWF沙盒冲突错误#2060,javascript,actionscript-3,google-chrome,flash,Javascript,Actionscript 3,Google Chrome,Flash,我使用将SWF对象从CDN嵌入到页面中 但是,当我在Chrome中加载页面时,会出现以下错误: SecurityError:错误#2060:安全沙盒冲突: 外部接口调用者无法访问 . 在 flash.external::ExternalInterface$/\u evalJS()位于 flash.external::ExternalInterface$/call()位于SWFObject/initApp()位于 SWFObject/\uuuuuuuu SWFObject\u应用程序1\u

我使用将SWF对象从CDN嵌入到页面中

但是,当我在Chrome中加载页面时,会出现以下错误:

SecurityError:错误#2060:安全沙盒冲突: 外部接口调用者无法访问 . 在 flash.external::ExternalInterface$/\u evalJS()位于 flash.external::ExternalInterface$/call()位于SWFObject/initApp()位于 SWFObject/\uuuuuuuu SWFObject\u应用程序1\u应用程序完成()位于 flash.events::EventDispatcher/dispatchEventFunction()位于 flash.events::EventDispatcher/dispatchEvent()。。。错误持续了一段时间 一会儿

我读到这个错误可以通过AllowScriptAccess标志来解决,所以我添加了这个

我还读到,Chrome Flash插件不能沙盒,这似乎是Chrome的一个缺陷

这似乎是真的,因为我能够在Firefox中成功地嵌入、加载和使用该对象

我已设置了所述的Security.allowDomain(“*”)。我没有设置Security.allowInsecureDomain


有没有办法修复Chrome中的这个错误

这可能有点晚了,但我最近也遇到了类似的问题。您能告诉我您是使用file://scheme还是chrome扩展名://scheme运行HTML页面吗

如果是这种情况,flash将不允许您调用ExternalInterface.call()或ExternalInterface.addCallback()。您的页面必须通过本地或远程主机上的HTTP服务器加载。重要的不仅仅是SWF文件的位置,还有嵌入SWF文件的容器页面的位置(老实说,我不确定flash是否检查了SWF文件的真实位置,但它肯定是在检查容器页面的位置)

总之,这些都不起作用:

file:///C:/Local/Folder/page.html
chrome-extension://<extension_id>/page.html
编辑:如果您真的想使用file://或chrome extension://schemes或类似的本地方案,那么我建议您将SWF文件的路径或层次结构中该文件上方的路径添加到全局安全设置页面:

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
http://subdomain.domain/page.html
https://subdomain.domain/page.html
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html