# \[MX 2004\] Problem with \_global variables & crossDomain

**URL:** <https://forum.kirupa.com/t/mx-2004-problem-with--global-variables-crossdomain/85632>\
**Category:** flash\
**Created:** [April 6, 2005, 6:03am UTC](https://forum.kirupa.com/t/mx-2004-problem-with--global-variables-crossdomain/85632 "2005-04-06T06:03:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anarcoma](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@anarcoma](https://forum.kirupa.com/u/anarcoma)\
**Post date:** [April 6, 2005, 6:03am UTC](https://forum.kirupa.com/t/mx-2004-problem-with--global-variables-crossdomain/85632/1 "2005-04-06T06:03:42Z")

</div>

Is there or is there not possible to access \_global variables between domains?

on [www.Domain1.com](http://www.Domain1.com) i have index.html and index.swf. Index.swf then loads main.swf from [www.Domain2.com](http://www.Domain2.com).

In index.swf i have a \_global variable that i want main to use. When calling for it all i get is undefined. The only way to access it is if i call for it using \_parent or \_root.

I have allowed the domains to communicate using  
System.security.allowDomain(“[http://www.Domain1.com](http://www.Domain1.com)”);  
System.security.allowDomain(“[http://www.Domain2.com](http://www.Domain2.com)”);

I have also put a crossdomain policy file on both servers…

But i dont really think this is a problem i can solve with cross domain policys since i CAN access the variables and functions using \_parent and \_root…or is it?
