安全域“http://domain.com/app/widget/twitter.png”尝试访问不兼容的上下文“app:/App.swf”
我正在尝试将远程映像加载到我的 AIR 应用程序中,但收到以下错误:
*** Security Sandbox Violation ***
SecurityDomain 'http://[------].com/app/widget/twitter.png' tried to access incompatible context 'app:/App.swf'
*域名已编辑
所以这基本上是说远程映像正在尝试访问该应用程序?如何将远程域添加为可信域?
我尝试了 Security.allowDomain('www.[-----].com')
并收到以下错误:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
I am trying to load a remote image into my AIR application, and I get the following error:
*** Security Sandbox Violation ***
SecurityDomain 'http://[------].com/app/widget/twitter.png' tried to access incompatible context 'app:/App.swf'
*domain name redacted
So it is basically saying that the remote image is trying to access the application? How do I add the remote domain as trusted?
I tried Security.allowDomain('www.[------].com')
and got the following error:
SecurityError: Error #3207: Application-sandbox content cannot access this feature.
at flash.system::Security$/allowDomain()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否有权访问远程域以将 crossdomain.xml 文件放在 Web 服务器的根目录下?
如果没有,您可以通过将图像加载为字节数组(请参阅 URLLoader)然后将其转换为内存中的图像(请参阅 SWFLoader.loadBytes)来解决沙箱问题。
Do you have access to the remote domain to put a crossdomain.xml file on the root of the web-server?
If not, you can get around the sandboxing issues by loading the image as a byte array (See URLLoader) and then converting it into an image (See SWFLoader.loadBytes) in memory.