# Can You Stop My Infinite Menu?

**URL:** https://forum.kirupa.com/t/can-you-stop-my-infinite-menu/68476
**Category:** flash
**Created:** [October 26, 2004, 8:10am UTC](https://forum.kirupa.com/t/can-you-stop-my-infinite-menu/68476 "2004-10-26T08:10:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rclay100](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@rclay100](https://forum.kirupa.com/u/rclay100)
#### Post date: [October 26, 2004, 8:10am UTC](https://forum.kirupa.com/t/can-you-stop-my-infinite-menu/68476/1 "2004-10-26T08:10:19Z")

</div>

Please can you help. I have created an infinite menu using the Kirupa tutorial and the code below. The menu works fine but I would like to stop it moving when the mouse cursor moves away from the menu. My movie clip for the menu contains navigation buttons.

Code:

onClipEvent (load)  
{  
xcenter=384;  
speed=1/10;  
}  
onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance\*speed);  
if (\_x \> 65) \_x=-573;  
if (\_x \< -573) \_x=65;  
}

Any help would be greatly appreciated.
