0

尝试从浏览器加载游戏时收到此错误消息:

*** Security Sandbox Violation ***
SecurityDomain 'https://playerio.s3.amazonaws.com/competitions/ega2012/swf/Nhm-JFy6dEyuemmaE59BSQ.swf?AWSAccessKeyId=1Q3ETXSFA8S2F2TSA9R2&Expires=1361787227&Signature=TBCVKQDGlxthLj2YhoumxTxUGOo%3D' tried to access incompatible context 'http://cdn.playerio.com/rts-tvkyczvzk5uwqv8z12rw/Game2build29.swf'
SecurityError: Error #2121: Security sandbox violation: LoaderInfo.content: https://playerio.s3.amazonaws.com/competitions/ega2012/swf/Nhm-JFy6dEyuemmaE59BSQ.swf?AWSAccessKeyId=1Q3ETXSFA8S2F2TSA9R2&Expires=1361787227&Signature=TBCVKQDGlxthLj2YhoumxTxUGOo%3D cannot access http://cdn.playerio.com/rts-tvkyczvzk5uwqv8z12rw/Game2build29.swf. This may be worked around by calling Security.allowDomain.
   at flash.display::LoaderInfo/get content()
   at Loader3_fla::MainTimeline/onCompleteHandler()[Loader3_fla.MainTimeline::frame1:86]

它说您可以使用 Security.allowDomain() 解决此错误,但我不确定允许哪个域!

4

1 回答 1

0

您应该将 crossdomain.xml 放在您的项目文件夹中,您可以在其中允许您的应用程序从中获取数据的所有域或某些特定域。

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

以上适用于所有域,如果您想允许某些特定域:

<allow-access-from domain="www.mysite.com" />
<allow-access-from domain="mysite.com" />
于 2013-02-25T05:39:31.327 回答