Boundry for Infinite menu- - -

Hi all! :slight_smile:

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

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