Accessing objects and variables from swf across domains

87 Views Asked by At

I am trying to access a variable from a test.swf on b.com from a parent.swf on a.com.

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));

I can access the swf like this. But how can I access and change the var test in test.swf?

1

There are 1 best solutions below

0
On

Basically can do so by modifying the url of the swf you are loading in.

Check this out