# onClipEvent(mouseOver)

**URL:** https://forum.kirupa.com/t/onclipevent-mouseover/150031
**Category:** flash
**Created:** [June 3, 2005, 2:56am UTC](https://forum.kirupa.com/t/onclipevent-mouseover/150031 "2005-06-03T02:56:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Henxon](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@Henxon](https://forum.kirupa.com/u/Henxon)
#### Post date: [June 3, 2005, 2:56am UTC](https://forum.kirupa.com/t/onclipevent-mouseover/150031/1 "2005-06-03T02:56:01Z")

</div>

Hello

I have 5 buttons and they are using an “apple menu” effect. Now, all the buttons are running an “enterFrame” function constantly to check if the cursor is over them. Can I make this in another way, so 5 different “enterFrame” functions don’t constantly run…? Something like _onClipEvent(mouseOver)_ …

[AS]onClipEvent (enterFrame) {  
xmouse = \_xmouse;  
ymouse = \_ymouse;  
if (xmouse\<0) {  
xmouse = -1\*xmouse;  
}  
if(ymouse\>-30 && ymouse\<30) {  
scale = 150-xmouse;  
} else {  
scale = 100;  
}  
if (scale\<100) {  
scale = 100;  
}  
if (scale\>150) {  
scale = 150;  
}  
setProperty("", \_xscale, scale/2);  
setProperty("", \_yscale, scale/2);  
}  
[/AS]

regards

henxon
