加载外部SWF - 沙箱冲突 [英] Loading external Swf - sandbox violation

查看:153
本文介绍了加载外部SWF - 沙箱冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助...一个紧迫的问题之一!我那么努力来理解了它..但我不能..所以我AP preciate你的帮助这么多..

I need a help ... an urgent one !!! i tried so hard to figured it out .. but i couldn't .. so I appreciate your help so much ..

我开发一个AIR应用程序使用闪光灯...应用程序通过XML动态加载外部SWF文件...的SWF文件中有一个影片剪辑,有一个监听器(点击)

I'm developing an Air App using flash ... the app loads an external SWF file dynamically through an xml ... the SWF file has a movieclip that has a listener (ON click )

功能mouseDownHandler(事件:MouseEvent)方法:无效{ navigateToURL(新的URLRequest(clickURL));

function mouseDownHandler(event:MouseEvent):void { navigateToURL(new URLRequest(clickURL));

}

一切工作正常,直到我点击这个影片剪辑...它显示下面的消息

everything is working fine until i click on this movieclip ... it displays the below message

引发SecurityError:错误#2121:安全沙箱冲突:navigateToURL: HTTP://www.mydomain。 COM / maskot / avatar.swf 不能访问YAHOO.COM为例。这可以通过调用Security.allowDomain被合作周围。

SecurityError: Error #2121: Security sandbox violation: navigateToURL: http://www.mydomain.com/maskot/avatar.swf cannot access YAHOO.COM for example. This may be worked around by calling Security.allowDomain.

任何帮助!因为我确实有一个最后期限!

any help !!! because i really have a deadline !

感谢你了!

推荐答案

Securit.allowDomain在这里无关紧要,因为这是唯一的,用于指示在其他主权财富基金/应用程序可以位于从访问你的应用程序。

Securit.allowDomain is irrelevant here because that is only for indicating where other SWFs/apps can be located to access your app from.

你所要做的是一个安全的侵犯,在它周围有没有直接的方法。但你可以尝试两件事情:

What you are trying to do is a security violation and there is no direct way around it. But you could try a couple things:

  1. vazor的想法
  2. 在写code。在您的主要应用程序,它增加了一个事件侦听器的按钮,一旦外部SWF被加载,然后从你的处理程序存在于主应用程序调用navigateToURL。我已经试过这种方法,它的工作原理。如果你需要,你也可以从外部的swf加载实际的URL。

除非你的最后期限是4 +这个答案可能没有用在未来几年...

This answer might not be useful unless your deadline was 4+ years in the future...

这篇关于加载外部SWF - 沙箱冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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