安全沙箱违规 - 加载文件系统和网络 SWF 文件
我已经使用 Flash 构建了整个网站,并在其中嵌入了几个 swf 对象(幻灯片)。当我将其发布为 swf 电影时,一切正常,但现在我想上传我的网站,出现一条错误消息:
错误#2044:未处理的SecurityErrorEvent:。 text=错误 #2140:安全沙箱违规:file:///mylayout.swf 无法加载 file:///slideshow_1.swf。 Local-with-filesystem 和 local-with-networking SWF 文件无法相互加载。
我知道这与以下事实有关:其中一个 swf 文件位于文件系统本地,另一个通过网络位于本地,但在我的发布设置中,我告诉它仅访问本地文件。那没有帮助。
我的网站托管在 www.all-inkl.com
;除此之外,我还没有上传;我只是离线测试一下。我知道我应该在某处添加此代码:
<allow-access-from domain="localhost" secure="true"/>`
但我不确定在哪里添加它。也许到我的时间表?
I have built my entire website with Flash and embedded several swf objects (slideshows) into it. Everything works fine when I publish it as swf movie, but now that I want to upload my website, an error message occurs saying:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///mylayout.swf cannot load file:///slideshow_1.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.
I know that it has something to do with the fact that one of the swf files is local to the filesystem and the other local via networking, but in my publish settings, I told it to access local files only. That didn't help.
I am hosting my website at www.all-inkl.com
; besides that, I have not uploaded it yet; I'm just testing it offline. I know I should add this code somewhere:
<allow-access-from domain="localhost" secure="true"/>`
but I'm not sure where to add it. Maybe to my timeline?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
crossdomain.xml 文件应指定您的服务器名称。 查看 http://www.msn.com/crossdomain.xml
例如, 必须在那里指定域名。您的服务器还应该有一个 crossdomain.xml。在那里添加相应的服务器名称。例如,如果您使用的是 localhost,请尝试添加
The crossdomain.xml file should have your server name specified. For example take a look at http://www.msn.com/crossdomain.xml
You will have to specify the domain names there. Your server should also be having a crossdomain.xml. Add the corresponding server name there. For example if you are using localhost, try adding
检查您的 swf 加载路径。尝试为每个 swf 指定完整路径,如“hppt://www.yourdomain.com/yourweb/mylayout.swf”。并在 swf 嵌入标记处设置 html 代码为allowScriptAccess:“always”
check your swf loading paths. try to specify the entire path like "hppt://www.yourdomain.com/yourweb/mylayout.swf" like this for every swf. and set the html code where the swf embed tag for allowScriptAccess : "always"