# Infinite Menu with buttons instead of mouse

**URL:** https://forum.kirupa.com/t/infinite-menu-with-buttons-instead-of-mouse/223702
**Category:** flash
**Created:** [April 25, 2007, 2:05am UTC](https://forum.kirupa.com/t/infinite-menu-with-buttons-instead-of-mouse/223702 "2007-04-25T02:05:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![evanimal](https://avatars.discourse-cdn.com/v4/letter/e/ee59a6/32.png) [@evanimal](https://forum.kirupa.com/u/evanimal)
#### Post date: [April 25, 2007, 2:05am UTC](https://forum.kirupa.com/t/infinite-menu-with-buttons-instead-of-mouse/223702/1 "2007-04-25T02:05:45Z")

</div>

Hey everyone. So I’m down to the very last revision of a site I’m designing, and they want to change the infinite menu to use left and right buttons, rather than where the mouse is to make the thing scroll.

How do I translate this…

onClipEvent (load)  
{  
xcenter=400;  
speed=1/20;  
}  
onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
\_x+=(distance\*speed);  
if (\_x \> 0) \_x=-800;  
if (\_x \< -800) \_x=0;  
}

…onto a left and right button that make it scroll the appropriate direction?

Could use this asap.

Thanks a ton

Evan
