Flash甚至不请求crossdomain.xml [英] Flash not even requesting crossdomain.xml
问题描述
我有一个 swf 托管在 a.domain.com
:
a.domain.com
: Flash播放器加载,发送加载的回调,有相机访问
b.domain.com
中: Flash播放器加载,无javascript回放,无相机访问
我的 a.domain.com/crossdomain.xml
p>
<?xml version =1.0?>
<!DOCTYPE跨域策略系统http://www.adobe.com/xml/dtds/cross-domain-policy.dtd\">
<跨网域政策>
< / cross-domain-policy>
问题是, crossdomain.xml
文件嵌入到不同的子域时,永远不会被请求。
在这里发生了什么?
我认为你可能得到了一个安全错误,为了验证,使用Flash Player调试版本来测试你的swf,你可以在这里下载: Adobe.com:Flash Player下载。为了避免这个错误,您可以尝试使用以下代码:
$ ul
Security.allowDomain('*'); / code>
< param name =allowscriptaccessvalue =always/>
。
I have a swf hosted at a.domain.com
:
- Embed the player on
a.domain.com
: Flash player loads, sends loaded callback, have camera access - Embed the player on
b.domain.com
: Flash player loads, no javascript callbacks, no camera access
My a.domain.com/crossdomain.xml
file:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*.domain.com" secure="false"/>
<allow-http-request-headers-from domain="*.domain.com" headers="*" secure="false"/>
</cross-domain-policy>
Problem is, the crossdomain.xml
file is never requested when embedded on a different subdomain.
What in the heck is going on here?
I think that you maybe got a security error, to verify that, try your swf using a flash player debug version that you can download here : Adobe.com : Flash Player Downloads.
And to avoid that error, you can try to use this :
- In your ActionScript code :
Security.allowDomain('*');
- In your swf object HTML embed code :
<param name="allowscriptaccess" value="always"/>
.
这篇关于Flash甚至不请求crossdomain.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!