# Variable assignment from SWF to loaded SWF

**URL:** <https://forum.kirupa.com/t/variable-assignment-from-swf-to-loaded-swf/143688>\
**Category:** Uncategorized\
**Created:** [April 7, 2005, 10:39pm UTC](https://forum.kirupa.com/t/variable-assignment-from-swf-to-loaded-swf/143688 "2005-04-07T22:39:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nextstep](https://avatars.discourse-cdn.com/v4/letter/n/a88e4f/32.png) [@nextstep](https://forum.kirupa.com/u/nextstep)\
**Post date:** [April 7, 2005, 10:39pm UTC](https://forum.kirupa.com/t/variable-assignment-from-swf-to-loaded-swf/143688/1 "2005-04-07T22:39:08Z")

</div>

Hi, I have been playing with this for a day and haven’t been able to figure out the proper path to load this variable.

So I have a main movie, a menu (movie clip) in it, and each menu option loads an external swf in a movie clip instance (called content) in the main movie.

Loading the movies works fine.

My problem is I want assign a variable that I have declared in a loaded movie in the ‘content’ instance.

Main Movie  
|  
- Menu (MC)  
-onrelease -loads movie.swf, assigns defaultpage var a value  
|  
\_ content (MC)  
|  
- Movie loaded dynamically from Menu (eg. movie.swf)  
-Variable defaultpage is declared on frame 1

Here is the onrelease code I’m using

on (release) {  
this.\_parent.content.loadMovie(“company.swf”); //this works  
this.\_parent.content.defaultpage = “somevalueinhere”; //this doesnt  
}

What am I doing wrong? thanks 🙂
