# Anyone know how to get MC to detect mouse over on btns

**URL:** <https://forum.kirupa.com/t/anyone-know-how-to-get-mc-to-detect-mouse-over-on-btns/42783>\
**Category:** Uncategorized\
**Created:** [February 12, 2004, 9:40pm UTC](https://forum.kirupa.com/t/anyone-know-how-to-get-mc-to-detect-mouse-over-on-btns/42783 "2004-02-12T21:40:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LanTech](https://avatars.discourse-cdn.com/v4/letter/l/e9bcb4/32.png) [@LanTech](https://forum.kirupa.com/u/LanTech)\
**Post date:** [February 12, 2004, 9:40pm UTC](https://forum.kirupa.com/t/anyone-know-how-to-get-mc-to-detect-mouse-over-on-btns/42783/1 "2004-02-12T21:40:09Z")

</div>

Hi all,

I’m hoping someone can help me with this problem, that has me stumped! :huh:

What I would like to do is this:

- I have a mask layer (which is a movie clip) “mask1”
- I have a button(s) on my menu “b1”,“b2”, …
- I have programmed actions into the mask movie clip, but need to have the movie clip detect when the/a button is on a RollOver state to trigger the appropriate behaviour.

Nothing I have tried so far seems to work. Can anyone help?

The actionscript I am using now is:

b1:

on(rollOver){  
\_parent.mask1.buttonCaller = this;  
}

mask1:

onClipEvent (load) {  
\_y = getProperty(\_root.mask1.\_y, \_y);  
speed = 5;  
menuOffy = -7.0;  
menuOny = 129.0;  
}  
onClipEvent (enterFrame) {  
if (buttonCaller.\_name == “b1”) {  
\_y = getProperty(\_root.mask1.\_y, \_y);  
endY = menoOny;  
\_y += (endY-\_y)/speed;  
}  
else {  
\_y = getProperty(\_root.mask1.\_y, \_y);  
endY = \_y;  
\_y += (menuOffy-\_y)/speed;  
}  
}

Also attached is a test fla file.

Thanks for your help!
