Flash甚至不请求crossdomain.xml [英] Flash not even requesting crossdomain.xml

查看:232
本文介绍了Flash甚至不请求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,你可以在这里下载: Adob​​e.com:Flash Player下载为了避免这个错误,您可以尝试使用以下代码:

$ ul

  • 在您的ActionScript代码中: Security.allowDomain('*'); / code>

  • 在您的swf对象中嵌入HTML代码:< 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屋!

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