# Swf loaded in Container won't work

**URL:** https://forum.kirupa.com/t/swf-loaded-in-container-wont-work/241717
**Category:** flash
**Created:** [October 17, 2007, 12:48pm UTC](https://forum.kirupa.com/t/swf-loaded-in-container-wont-work/241717 "2007-10-17T12:48:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Max\_Space](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Max\_Space](https://forum.kirupa.com/u/Max_Space)
#### Post date: [October 17, 2007, 12:48pm UTC](https://forum.kirupa.com/t/swf-loaded-in-container-wont-work/241717/1 "2007-10-17T12:48:52Z")

</div>

Hi all,  
I built a variation of Comic Geeks easing menu system ([http://www.actionscript.org/resource...tem/Page1.html](http://www.actionscript.org/resource...tem/Page1.html)) which works fine just by itself.  
After loading it into a Container of my main movie, the buttons refuse to function though.  
Since I’m not a pro my best guess is that it might have to do with the actionscript?

Most likely the \_root reference or the coordinates of the loaded movie don’t work, but it doesn’t react at all.

I’d apreciate any help on this.

Here’s the code from the loaded movie:

//during the time the movie loads, we set the current  
//position of the content at 0,0; thus showing the  
//HOME section of the site.  
onClipEvent (load) {  
\_x = 0;  
\_y = 0;  
div = 5; //This value just determines the speed  
//the transistions.  
}  
//Here we constantly check for new values of  
// \_x and \_y. These values are determined by endX and endY.  
//We divide the difference by div to have an value that  
//continues to change until the equation is true.  
//Try changing the ‘enterFrame’ with ‘Load’ to see the  
//difference. You would then have to click on a button  
//several times before the transistion completes.  
onClipEvent (enterFrame) {  
\_x += (endX-\_x)/div;  
\_y += (endY-\_y)/div;

//We then use the onRelease method to determine the  
//new values of endX and endY. This is a new feature  
//in Flash MX.  
\_root.home.onRelease = function() {  
endX = 0;  
endY = 0;  
};  
\_root.works.onRelease = function() {  
endX = -700;  
endY = 0;  
};  
\_root.skills.onRelease = function() {  
endX = -1400;  
endY = 0;  
};

Many thanks!
