# Nested movie clips

**URL:** <https://forum.kirupa.com/t/nested-movie-clips/286443>\
**Category:** Uncategorized\
**Created:** [April 15, 2009, 3:22pm UTC](https://forum.kirupa.com/t/nested-movie-clips/286443 "2009-04-15T15:22:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![oh\_elle](https://avatars.discourse-cdn.com/v4/letter/o/d2c977/32.png) [@oh\_elle](https://forum.kirupa.com/u/oh_elle)\
**Post date:** [April 15, 2009, 3:22pm UTC](https://forum.kirupa.com/t/nested-movie-clips/286443/1 "2009-04-15T15:22:56Z")

</div>

Hi guys,

I have multiple movie clips nesting inside each other as I need them to perform different functions.

On my main timeline I have a mc called “menu\_mc”, inside of that I have “menubg\_mc” and inside of that I have “drop\_mc”. I have some code on the “menu\_mc” timeline, a tween class to make the menu slide out from the left of the stage. Inside the “drop\_mc” timeline I have some tween class code which reveals the drop down menu. Now the slide out menu works fine but because the “drop\_mc” is 2 levels deep, it won’t play the drop down tween.  
I know that I need to target this movie clip but my question to you is… Where do I place the code for “drop\_mc” (tween) as obviously it doesn’t work being nestled 2 levels deep.  
I have the following code in the main timeline

> import mx.transitions.Tween;  
> import mx.transitions.easing.\*;  
> var rolled\_up = menu\_mc.\_x;  
> var rolled\_out = 0;  
> function slide\_out() {  
> current\_x = menu\_mc.\_x;  
> var anim:Tween = new Tween(menu\_mc, “\_x”, Strong.easeOut, current\_x, rolled\_out, 1, true);  
> }  
> function slide\_in() {  
> current\_x = menu\_mc.\_x;  
> var anim:Tween = new Tween(menu\_mc, “\_x”, Back.easeOut, current\_x, rolled\_up, 1, true);  
> }  
> menu\_mc.onRollOver = function(){  
> slide\_out();  
> }

hidden\_btn.onRollOver = function(){  
slide\_in();  
}

function turnOn() {  
new Tween(this.menu\_mc.menubg\_mc.menubg\_mc.mask\_mc, “\_y”, Strong.easeOut, -145, 150, 1, true);  
}

function turnOff() {  
new Tween(this.menu\_mc.menubg\_mc.menubg\_mc.mask\_mc, “\_y”, Strong.easeIn, 150, -145, 1, true);  
}

this.menu\_mc.menubg\_mc.menubg\_mc.drop\_btn.onRollOver= turnOn;  
this.menu\_mc.menubg\_mc.menubg\_mc.invisClip.onRollOver= turnOff;

Please help, it’s so frustrating!

Thanks,  
Elle
