开发者

Crossdomain xml and flash

开发者 https://www.devze.com 2022-12-26 21:43 出处:网络
I have a web server application (based on python). Flash applications which are located at this server should connect to the server. The trouble is in crossdomain.xml.

I have a web server application (based on python). Flash applications which are located at this server should connect to the server. The trouble is in crossdomain.xml.

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
 <allow-access-from domain="*" to-ports="*"/>
</cross-domain-policy>       

Here is this file (it's in the root directory).

The开发者_C百科 exact problem is that flash-applications don't load this file. Are there any ways to do this manually? For example, load it directly from flash-script or make up a new application at given port which will send this file to any connected socket.


you're not closing the <cross-domain-policy> tag with </cross-domain-policy> - have you just forgot to copy/paste the last line? otherwise try that. also you might not need the DOCTYPE line and the to-ports="*" either.

we use this crossdomain.xml file and as long as it's in the root folder, it's worked fine for us every time

<?xml version="1.0"?>
<cross-domain-policy>
    <allow-access-from domain="*" />
</cross-domain-policy>

if it's an https domain and you want flash on non-https domains to access it you'll need to change the allow-access-from line to this

<allow-access-from domain="*" secure="false" />

one final thing worth trying is adding this line :

<allow-http-request-headers-from domain="*" headers="*"/>

but we've never had to use that for standard flash loading/saving via http.


can you run the SWF in a Firefox and use firebug or tamper data to see whether it does any policy file request at all? if so, move the file to the according directory.

0

精彩评论

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

关注公众号