2016-10-13 00:16:48 点击量:55 标签: 收藏本文
有同事说某个Flash的插件,放到Qzone,新浪等网站,Flash里的链接点击都不生效了,打开一看,果然。
然后用FireFox打开,点击链接,FlashPlayer报错:
SecurityError: Error #2146: 安全沙箱冲突:http://xxx/xxx.swf 不能调用 navigateToURL,因为 HTML/容器参数 allowNetworking 具有值 internal。
at global/flash.net::navigateToURL()
然后查查allowNetworking是何方神圣,官网解释:
This HTML parameter governs a number of ActionScript APIs. It has the following possible values:
"all"—the default. No networking restrictions; player behaves normally.
"internal"—SWF files may not call browser navigation or browser interaction APIs, but may call any other networking APIs.
"none"—SWF files may not call any networking APIs, nor any SWF-to-SWF communication APIs.
allowNetworking
参数:
可以控制 SWF 文件对网络功能的访问。调用被禁止的 API 会引发 SecurityError 异常。
当 allowNetworking 设置为 "internal" 时,以下 API 被禁止:
当 allowNetworking 设置为 "none" 时,除了上面列出的那些 API 外,还会禁止以下 API:
扩展阅读
AllowScriptAccess
参数:
AllowScriptAccess 参数可以防止从一个域中承载的 SWF 文件访问来自另一个域的 HTML 页面中的脚本。
对从另一个域承载的所有 SWF 文件使用 AllowScriptAccess="never" 可以确保位于 HTML 页面中的脚本的安全性。
allowFullScreen
参数:
我们是一家提供综合软件外包与弱电工程服务的技术公司。
业务涵盖定制软件、管理系统、网站、小程序、APP、系统集成、网络布线、监控安防、门禁、机房建设及长期技术维护。
公司地址:湖北省宜昌市伍家岗区东站二路6号三峡(宜昌)大数据产业园海洋馆二楼A203室