# Simple buttons in a simple MC

**URL:** <https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443>\
**Category:** Uncategorized\
**Created:** [April 13, 2006, 12:39pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443 "2006-04-13T12:39:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SirDuke](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@SirDuke](https://forum.kirupa.com/u/SirDuke)\
**Post date:** [April 13, 2006, 12:39pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/1 "2006-04-13T12:39:33Z")

</div>

everything is so simple. a simple MC that contains some simple buttons. its a drop-down-menu. but the buttons wont work :S

im sure its something really easy… let’s hope i’m right 🙂

---

<div class="post-metadata">

**Author:** ![Mirandir](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mirandir](https://forum.kirupa.com/u/Mirandir)\
**Post date:** [April 13, 2006, 1:00pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/2 "2006-04-13T13:00:36Z")

</div>

I get unexpected fileformat when trying to open your fla-file.

Anyhow it sounds like you have put at least one button event on the movieclip. If so you need to consider a different approach to your drag-n-drop menu. The symbol closest to the root of the moviehierarchy will keep all button events to itself. Even if they listen different events.

An example of a different approach might be using a button in the bottom of the timeline that is used to “fire” the drag-n-drop functionality. Or you can use the mouse events “onMouseDown” and “onMouseUp” combined with a hitTest() to “simulate” onPress and onRelease events.

/Mirandir

---

<div class="post-metadata">

**Author:** ![SirDuke](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@SirDuke](https://forum.kirupa.com/u/SirDuke)\
**Post date:** [April 13, 2006, 1:44pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/3 "2006-04-13T13:44:30Z")

</div>

i had it saved for the version 8 of flash. this one is for 2004 MX so you can open it i guess. If you do so, you will see that “using a button in the bottom of the timeline that is used to “fire” the drag-n-drop functionality” donesn’t suit me. cause i lose the interactivity.

now for the:

> [@Mirandir](#):
>
> Or you can use the mouse events “onMouseDown” and “onMouseUp” combined with a hitTest() to “simulate” onPress and onRelease events.
> 
> /Mirandir

i didnt quite get it. could you explain, in case it could help? 🙂

---

<div class="post-metadata">

**Author:** ![SirDuke](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@SirDuke](https://forum.kirupa.com/u/SirDuke)\
**Post date:** [April 13, 2006, 2:12pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/4 "2006-04-13T14:12:25Z")

</div>

what i believe is happening is that flash sees the “whole menu” on top of everything else. so when the mouse gets over the buttons they wont light up cause according to flash the mouse is not over the buttons but over the “invisible layer” of the whole menu.

What i need is a way to “put the buttons on top”. or a smarter way to do the same thing 😛

---

<div class="post-metadata">

**Author:** ![Mirandir](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mirandir](https://forum.kirupa.com/u/Mirandir)\
**Post date:** [April 13, 2006, 3:23pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/5 "2006-04-13T15:23:09Z")

</div>

I do have Flash 8 too. anyhow.

It is as i suspected. In your menu you have set onRollOver and onRollOut on the menu movieclip. This will make the menu movieclip “eat” all button events. So the buttons inside will not get anything.

Here I’ve attached a .fla that uses onMouseMove and hitTest() to open the menu.

---

<div class="post-metadata">

**Author:** ![SirDuke](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@SirDuke](https://forum.kirupa.com/u/SirDuke)\
**Post date:** [April 13, 2006, 4:07pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/6 "2006-04-13T16:07:36Z")

</div>

i never used those 2 functions before. i will look in the reference to see what they do exactly and what’s their difference to “rollOver - rollOut” functions. They look quite valuable!

Oh and Marandir i have a confession to make!  
i love you :ko:

---

<div class="post-metadata">

**Author:** ![JoshuaJonah](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/joshuajonah/32/1775_2.png) [@JoshuaJonah](https://forum.kirupa.com/u/JoshuaJonah)\
**Post date:** [April 13, 2006, 4:09pm UTC](https://forum.kirupa.com/t/simple-buttons-in-a-simple-mc/185443/7 "2006-04-13T16:09:33Z")

</div>

lol
