# Stopping the infinate menu!

**URL:** https://forum.kirupa.com/t/stopping-the-infinate-menu/232126
**Category:** flash
**Created:** [July 11, 2007, 1:02pm UTC](https://forum.kirupa.com/t/stopping-the-infinate-menu/232126 "2007-07-11T13:02:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tct182](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@tct182](https://forum.kirupa.com/u/tct182)
#### Post date: [July 11, 2007, 1:02pm UTC](https://forum.kirupa.com/t/stopping-the-infinate-menu/232126/1 "2007-07-11T13:02:14Z")

</div>

Hi,

I have made a side scrolling menu with [Pom’s Infinate Menu tutorial](http://www.kirupa.com/developer/mx/infinite.htm) which kinda works fine but, instead of just keep on scrolling round and round, I want it to stop when it reaches the end of the menu movie clip (the menu movie clip is made up of typical looking ‘film cells’)

Ths is the code i’ve used;

```auto
 
onClipEvent (load)
{
   xcenter=400;
   speed=1/30;
}
onClipEvent (enterFrame)
{
   var distance=_root._xmouse-xcenter;
   _x+=(distance*speed);
   if (_x > 1600) _x=-0;
   if (_x < -0) _x=1600;
}

```

Here’s a link to the .fla too;  
[http://www.blackheathproducts.co.uk/menu001.fla](http://www.blackheathproducts.co.uk/menu001.fla)

I just can’t figure out how to make it work in this way. :tired:

Can anyone help me on this one?
