# Infinite menu speed

**URL:** https://forum.kirupa.com/t/infinite-menu-speed/284842
**Category:** flash
**Created:** [March 24, 2009, 11:00am UTC](https://forum.kirupa.com/t/infinite-menu-speed/284842 "2009-03-24T11:00:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![a2n](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@a2n](https://forum.kirupa.com/u/a2n)
#### Post date: [March 24, 2009, 11:00am UTC](https://forum.kirupa.com/t/infinite-menu-speed/284842/1 "2009-03-24T11:00:54Z")

</div>

Hi, I’m using this swf in a HTML site and it looks great, but when I start the navigation it speeds up a lot! I’ve tried to slow down the maximum speed but it still goes over, and really fast…

This is my code:

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

```

It’s moving opposite than the original code but this problem was there before I changed it.

How should I solve this bug?

Thanx. ^\_~
