# Movie clip button inside movie clip

**URL:** <https://forum.kirupa.com/t/movie-clip-button-inside-movie-clip/261388>\
**Category:** flash\
**Created:** [May 27, 2008, 8:02am UTC](https://forum.kirupa.com/t/movie-clip-button-inside-movie-clip/261388 "2008-05-27T08:02:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![m00nz00mer](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@m00nz00mer](https://forum.kirupa.com/u/m00nz00mer)\
**Post date:** [May 27, 2008, 8:02am UTC](https://forum.kirupa.com/t/movie-clip-button-inside-movie-clip/261388/1 "2008-05-27T08:02:50Z")

</div>

hey ive got a slider menu which opens when clicked. however the buttons (also mc instanced) inside the slider mc wont work… here is the code:

//Menu Slider Background  
\_root.menuSlider\_MC.onRollOver = function() {  
new Tween(\_root.menuSlider\_MC, “\_x”, Bounce.easeOut, \_root.menuSlider\_MC.\_x,-250, 20);s  
}

\_root.menuSlider\_MC.onRollOut = function() {  
new Tween(\_root.menuSlider\_MC, “\_x”, Bounce.easeOut, \_root.menuSlider\_MC.\_x,-305, 20);s  
}

\_root.menuSlider\_MC.onPress = function() {  
new Tween(\_root.menuSlider\_MC, “\_x”, Bounce.easeOut, \_root.menuSlider\_MC.\_x,50, 20);s  
}

//Menu Buttons  
\_root.menuSlider\_MC.web\_MC.onRollOver = function() {  
trace(“yes”);  
}

the slider mc works however i cant seem to get the ‘web\_MC’ to respond…

how can i fix this? cheers.

---

<div class="post-metadata">

**Author:** ![btibia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/btibia/32/1625_2.png) [@btibia](https://forum.kirupa.com/u/btibia)\
**Post date:** [May 27, 2008, 8:09am UTC](https://forum.kirupa.com/t/movie-clip-button-inside-movie-clip/261388/2 "2008-05-27T08:09:47Z")

</div>

Hi,

This will not work because the last event

```auto

//Menu Buttons
_root.menuSlider_MC.web_MC.onRollOver = function() {
trace("yes");
}

```

will not be triggered, why?  
Because of the rollover event of his parent

```auto

//Menu Slider Background
_root.menuSlider_MC.onRollOver = function() {
new Tween(_root.menuSlider_MC, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-250, 20);s
}

```

Solution:  
You could do a new movieclip inside menuSlider\_MC, lets call it menuSlider\_BG with this code

```auto

_root.menuSlider_MC.menuSlider_BG.onRollOver = function() {
new Tween(this._parent, "_x", Bounce.easeOut, _root.menuSlider_MC._x,-250, 20);s
}

```

Let me know how it worked.

btibia out :thumb2:

---

<div class="post-metadata">

**Author:** ![m00nz00mer](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@m00nz00mer](https://forum.kirupa.com/u/m00nz00mer)\
**Post date:** [May 27, 2008, 10:39am UTC](https://forum.kirupa.com/t/movie-clip-button-inside-movie-clip/261388/3 "2008-05-27T10:39:04Z")

</div>

there not directly on elements?
