【问题标题】:Accessing objects and variables from swf across domains跨域从 swf 访问对象和变量
【发布时间】:2013-04-27 14:36:06
【问题描述】:

我正在尝试从 a.com 上的 parent.swf 访问 b.com 上的 test.swf 的变量。

test.swf:

Security.allowDomain("a.com");
var test = 0;

parent.swf:

var loader:Loader = new Loader();
var url:String = "http://b.com/test.swf";
loader.load(new URLRequest(url));

我可以像这样访问 swf。但是如何访问和更改 test.swf 中的var test

【问题讨论】:

    标签: actionscript-3 flash cross-domain-policy asunit


    【解决方案1】:

    基本上可以通过修改你正在加载的 swf 的 url 来做到这一点。

    Check this out

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-07-05
      • 1970-01-01
      • 2012-02-23
      • 2011-01-01
      • 1970-01-01
      • 2014-05-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多