# Boundry for Infinite menu- - -

**URL:** https://forum.kirupa.com/t/boundry-for-infinite-menu/122560
**Category:** Uncategorized
**Created:** [September 14, 2004, 8:53pm UTC](https://forum.kirupa.com/t/boundry-for-infinite-menu/122560 "2004-09-14T20:53:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnnyFlash](https://avatars.discourse-cdn.com/v4/letter/j/2bfe46/32.png) [@johnnyFlash](https://forum.kirupa.com/u/johnnyFlash)
#### Post date: [September 14, 2004, 8:53pm UTC](https://forum.kirupa.com/t/boundry-for-infinite-menu/122560/1 "2004-09-14T20:53:14Z")

</div>

Hi all! 🙂

I’ve searched around for an answer to this on the forums’ archives, but to no avail ☹

All i need to do is put a boundry for the infinite menu to stop at for the left and right.  
This is my code from the tut:  
[AS]  
onClipEvent (load)  
{  
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;  
}  
[/AS]

And if there is already a thread about boundries for the infinite menu…can you just direct me there? **Thanks so, so much!**

Johnny
