# Problem loading swf's into a movie clip

**URL:** <https://forum.kirupa.com/t/problem-loading-swfs-into-a-movie-clip/233333>\
**Category:** Uncategorized\
**Created:** [July 23, 2007, 5:15am UTC](https://forum.kirupa.com/t/problem-loading-swfs-into-a-movie-clip/233333 "2007-07-23T05:15:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![omgular](https://avatars.discourse-cdn.com/v4/letter/o/df788c/32.png) [@omgular](https://forum.kirupa.com/u/omgular)\
**Post date:** [July 23, 2007, 5:15am UTC](https://forum.kirupa.com/t/problem-loading-swfs-into-a-movie-clip/233333/1 "2007-07-23T05:15:03Z")

</div>

Ok, so I have a fairly simple background .swf (basically just a centered box on top of a repeating pattern), that background .swf is in turn is loading a more complex .swf inside of a movie clip. The complex movie clip is an index menu, so it has “links” so to speak that when clicked need to tell the main .swf to load a different movie clip.

The way I have been trying to get this to work is I have the complex .swf change the value of a \_root.variable to say, for example, 100. In turn I have an if statement setup in the background .swf to unload the movie clip and set the value of \_root.variable to 99. I then have another if statement which loads the desired movie clip if \_root.variable = 99, and then finally sets \_root.variable back to 0. However, it seems to fail to do that entirely. Oddly enough the variable starts alternating between 0 and 99, loading and unloading the movie.

Is there another way to pass the variable from the complex .swf to the background .swf that will prevent it from doing this? I imagine this all has something to do with how the variable is being declared, but I’m a bit new to actionscript and I’m totally missing it.

I’ve included a link to the project files for this so you can take a look at the actionscript if needed. This thing has been giving me fits, so any help would be GREATLY appreciated.

[http://www.yousendit.com/transfer.ph…A5E38F18E74BA1](http://www.yousendit.com/transfer.php?action=download&ufid=7DA5E38F18E74BA1)

Thanks!
