# Infinate Menu Problems

**URL:** https://forum.kirupa.com/t/infinate-menu-problems/95597
**Category:** Uncategorized
**Created:** [November 27, 2003, 2:27pm UTC](https://forum.kirupa.com/t/infinate-menu-problems/95597 "2003-11-27T14:27:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![deland01](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@deland01](https://forum.kirupa.com/u/deland01)
#### Post date: [November 27, 2003, 2:27pm UTC](https://forum.kirupa.com/t/infinate-menu-problems/95597/1 "2003-11-27T14:27:04Z")

</div>

Can anyone help, I looked at this tutorial on making an infinite menu and found it to be very useful:

[http://www.kirupa.com/developer/mx/infinite.htm](http://www.kirupa.com/developer/mx/infinite.htm)

the menu scrolls backward and forward following your mouse. I only want the menu to move when the mouse is over the menu.

I have changed the script so the menu is activated on(rollOver) but need help in telling the menu to stop when the mouse is not over it.

The script I am using at the moment is:

on(rollOver)  
{  
xcenter=150;  
speed=1/10;  
}  
onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance\*speed);  
if (\_x \> 0) \_x=-300;  
if (\_x \< -300) \_x=0;  
}

Any suggestions??
