# The Infinite Menu Tutorial

**URL:** https://forum.kirupa.com/t/the-infinite-menu-tutorial/15577
**Category:** flash
**Created:** [March 15, 2003, 11:30pm UTC](https://forum.kirupa.com/t/the-infinite-menu-tutorial/15577 "2003-03-15T23:30:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zcarrington1](https://avatars.discourse-cdn.com/v4/letter/z/3ec8ea/32.png) [@zcarrington1](https://forum.kirupa.com/u/zcarrington1)
#### Post date: [March 15, 2003, 11:30pm UTC](https://forum.kirupa.com/t/the-infinite-menu-tutorial/15577/1 "2003-03-15T23:30:39Z")

</div>

I’ve completed the infinite menu tutorial and am going to implement a menu of this type on my site. I would like to know how to slow the menu down a bit so that it does not scroll so fast when the mouse is all the way to the left or right edge. Here is the code:

onClipEvent (load) {  
xcenter = 150;  
speed = 1/10;  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
\_x += (distance_speed);  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
\_x += (distance_speed);  
if (\_x\>0) {  
\_x = -300;  
}  
if (\_x\<-300) {  
\_x = 0;  
}  
}

I tried changing the speed variable to 1/5 and such but it seems to still go really fast. Can anyone help.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 15, 2003, 11:41pm UTC](https://forum.kirupa.com/t/the-infinite-menu-tutorial/15577/2 "2003-03-15T23:41:42Z")

</div>

Try this for the speed:  
[AS]onClipEvent (load)  
{  
xcenter=150;  
speed=1/80;  
}[/AS]
