# Hmm...Complex buttons with \_root.container?!

**URL:** <https://forum.kirupa.com/t/hmm-complex-buttons-with--root-container/182691>\
**Category:** Uncategorized\
**Created:** [March 20, 2006, 7:44pm UTC](https://forum.kirupa.com/t/hmm-complex-buttons-with--root-container/182691 "2006-03-20T19:44:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cardiel](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cardiel](https://forum.kirupa.com/u/cardiel)\
**Post date:** [March 20, 2006, 7:44pm UTC](https://forum.kirupa.com/t/hmm-complex-buttons-with--root-container/182691/1 "2006-03-20T19:44:30Z")

</div>

Hi there,

I’m in the process of creating 2 websites. In the first, I used buttons on my main menu and used the tutorial on loading external swf files into a container movie clip ([http://www.kirupa.com/developer/mx2004/transitions2.htm](http://www.kirupa.com/developer/mx2004/transitions2.htm)) and this worked a treat!

However, I’m onto another website now and am using the complex rollover/rollout effects button tutorial ([http://www.kirupa.com/developer/mx2004/button\_effect.htm](http://www.kirupa.com/developer/mx2004/button_effect.htm)) and am trying to combine both.

However, I can’t get a swf to load into the container movie clip.

Any advice?? I’ll be super grateful to anyone who can help!

Thanks!

---

<div class="post-metadata">

**Author:** ![daleth](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daleth/32/1096_2.png) [@daleth](https://forum.kirupa.com/u/daleth)\
**Post date:** [March 20, 2006, 10:58pm UTC](https://forum.kirupa.com/t/hmm-complex-buttons-with--root-container/182691/2 "2006-03-20T22:58:46Z")

</div>

Better post some code or something, we don’t have anything to go on 🙂

---

<div class="post-metadata">

**Author:** ![cardiel](https://avatars.discourse-cdn.com/v4/letter/c/46a35a/32.png) [@cardiel](https://forum.kirupa.com/u/cardiel)\
**Post date:** [March 21, 2006, 7:23pm UTC](https://forum.kirupa.com/t/hmm-complex-buttons-with--root-container/182691/3 "2006-03-21T19:23:53Z")

</div>

Hi there,

Thanks for taking the time to look into this with me! This is the code that I am trying to use on the complex rollout/rollover button/movieclip:

_on (release, releaseOutside) {  
\_root.container.loadMovie(“comingsoon.swf”)  
}_

I get the feeling that because the rest of the code:

\*stop();

this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}  
}

this.onRollOver = function(){  
rewind = false;  
play();  
}

this.onRollOut = function(){  
rewind = true;  
}  
\*  
…is embedded within the movieclip on the first frame, that this is where I should put my “onRelease” code. However, I’ve tried that and I can’t seem to get it to work!

I’m just not sure how to tweak the “onRelease” code to make it work to load an external swf file into a “container” movie clip. Is it because of where the code is or simply becasue that code is only suitable for buttons rather than movieclips?

Thanks in advance!!!
