# Button inside mc not working

**URL:** <https://forum.kirupa.com/t/button-inside-mc-not-working/264842>\
**Category:** Uncategorized\
**Created:** [July 1, 2008, 4:16am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842 "2008-07-01T04:16:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [July 1, 2008, 4:16am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/1 "2008-07-01T04:16:05Z")

</div>

Hi guys, i have a movie clip that contains several buttons. Inside that movie clip I can access the buttons for example:

```auto

mc_next.onRelease = function(){
trace('hello');
}

```

It works fine, however if I have a onRollOver event on the main MC that include the buttons, the buttons within stop working.

```auto

player.onRollOut = function(){
	this.gotoAndStop(1);
}

```

Any ideas, I have tried to search the forum. I believe it should be a simple solution.

Thanks in advance  
d:bounce:

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [July 1, 2008, 4:16am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/2 "2008-07-01T04:16:58Z")

</div>

Can’t do that in AS2 without using bounds instead of rollhandlers.

---

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [July 1, 2008, 4:37am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/3 "2008-07-01T04:37:39Z")

</div>

are you talking about hit test?

---

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [July 1, 2008, 10:12pm UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/4 "2008-07-01T22:12:35Z")

</div>

or do you mean x\_mouse and y\_mouse?

---

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [July 2, 2008, 11:33am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/5 "2008-07-02T11:33:20Z")

</div>

anyone with any ideas? i think i may have confused some people. It’s not an actual ‘button’, its a movieClip inside another movieClip that acts as a button. But they don’t work when the main movieclip has a rollOver event.

---

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [July 3, 2008, 2:03am UTC](https://forum.kirupa.com/t/button-inside-mc-not-working/264842/6 "2008-07-03T02:03:55Z")

</div>

I have attached a fla with an example of qhat I am talking about.

Any help or direction would be much appreciated.

I almost worked around it by adding a transparent mc inside the main mc and gave that the rollOver event. It worked fine, but if the layer is over the button it wouldn’t work.

Thanks

d
