2047 从服务器端将外部 swf 文件加载到 flex 时出现安全沙箱违规错误 [英] 2047 Security sandbox violation errors while loading an external swf file into flex from server side

查看:19
本文介绍了2047 从服务器端将外部 swf 文件加载到 flex 时出现安全沙箱违规错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码,我想为我的 flex 应用程序网站放置一个外部 swf 文件.这是我的代码:

This is my code and i want to place an external swf file for my flex application website. This is my code:

var loader:Loader = new Loader();
var url:URLRequest = new URLRequest("http://www.my site.com");
loader.load(url);
addChild(loader);

如果有人有任何帮助,将不胜感激.亚泰

If somebody have any help please it will be thankful. Atishay

推荐答案

我不完全确定您要问什么或您的问题是什么.除非其他域给予许可,否则 SWF 不可能访问来自其他域的内容.为此,您需要创建一个 crossdomain.xml 文件.这里有一些关于跨域文件的好链接:

I'm not entirely sure what you're asking or what your problem is. It is not possible for a SWF to access content from another domain unless that other domain gives permission. To do that you'll have create a crossdomain.xml file. Here are some good links about cross domain files:

http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=addfile&objectID=287

这是我用于 The Flex Show 网站的 crossdomain.xml 文件:

And here is the crossdomain.xml file I use for The Flex Show Web site:

http://www.theflexshow.com/crossdomain.xml

<cross-domain-policy>
 <site-control permitted-cross-domain-policies="all"/>
 <allow-access-from domain="*"/>
 <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

这允许任何 Flash SWF 访问 theflexshow.com 域上的内容.

This allows any Flash SWF to access content on theflexshow.com domain.

如果这对解决问题没有帮助,您将必须准确地告诉我们您的问题是什么.

If this doesn't help address the issue, you're going to have to tell us exactly what your problem is.

这篇关于2047 从服务器端将外部 swf 文件加载到 flex 时出现安全沙箱违规错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆