2047 Security sandbox violation errors while loading an external swf file into flex from server side

走远了吗. 提交于 2020-01-07 04:18:27

问题


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


回答1:


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

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>

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.



来源:https://stackoverflow.com/questions/4850465/2047-security-sandbox-violation-errors-while-loading-an-external-swf-file-into-f

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!