# Loading variables from another swf

**URL:** <https://forum.kirupa.com/t/loading-variables-from-another-swf/230106>\
**Category:** Uncategorized\
**Created:** [June 22, 2007, 4:52pm UTC](https://forum.kirupa.com/t/loading-variables-from-another-swf/230106 "2007-06-22T16:52:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zhet](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/zhet/32/3307_2.png) [@Zhet](https://forum.kirupa.com/u/Zhet)\
**Post date:** [June 22, 2007, 4:52pm UTC](https://forum.kirupa.com/t/loading-variables-from-another-swf/230106/1 "2007-06-22T16:52:28Z")

</div>

I tried to use loadVars() and loadVariables(), but when I tried to trace a value of some variable it gived me “undefined”, i am really stuck here, have anyone did this before?

PS: for that I specially made 2 files: 1.swf and 2.swf  
2.swf reads data from 1.swf

in 1.swf frame I place this code:

```auto

var aaa = 55;

```

in 2.swf I placed this code:

```auto

var sas = new LoadVars();
sas.load("1.swf");
trace(aaa);

```

hope that helps:)
