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

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

问题描述

这是我的代码,我想为我的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

这是我用于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.

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

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