# Creating an over area with x & y mouse positions

**URL:** <https://forum.kirupa.com/t/creating-an-over-area-with-x-y-mouse-positions/68775>\
**Category:** flash\
**Created:** [October 28, 2004, 7:43pm UTC](https://forum.kirupa.com/t/creating-an-over-area-with-x-y-mouse-positions/68775 "2004-10-28T19:43:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhunki](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@mhunki](https://forum.kirupa.com/u/mhunki)\
**Post date:** [October 28, 2004, 7:43pm UTC](https://forum.kirupa.com/t/creating-an-over-area-with-x-y-mouse-positions/68775/1 "2004-10-28T19:43:53Z")

</div>

I’m trying to create an area that causes a menu to fade in, similar to the toolbar in Mac OSX. So when the mouse nears that area the menu pops up, I’ve been trying it with some code, not sure if I’m heading in the right direction. Any help as usual greatly appreciated.

onClipEvent (enterFrame) {  
\_root.top = 8;  
\_root.bottom = 104;  
\_root.left = 367;  
\_root.right = 744;  
if (\_root.\_xmouse \> \_root.right) {  
if (\_root.\_ymouse \< \_root.bottom){  
this.gotoAndStop(“in”);  
} else {  
this.gotoAndStop(1);  
}  
}  
if (\_root.\_xmouse \> \_root.right) {  
if (\_root.\_ymouse \> \_root.top){  
this.gotoAndStop(“in”);  
} else {  
this.gotoAndStop(1);  
}
