开发者

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

开发者 https://www.devze.com 2023-02-08 04:00 出处:网络
This is my code and i want to place an external swf file for my flex application website. This is my code:开发者_JAVA技巧

This is my code and i want to place an external swf file for my flex application website. This is my code:开发者_JAVA技巧

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消