# Infinite Menu Scrolling Issue

**URL:** <https://forum.kirupa.com/t/infinite-menu-scrolling-issue/89283>\
**Category:** flash\
**Created:** [May 6, 2005, 5:29pm UTC](https://forum.kirupa.com/t/infinite-menu-scrolling-issue/89283 "2005-05-06T17:29:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgraley](https://avatars.discourse-cdn.com/v4/letter/r/ee59a6/32.png) [@rgraley](https://forum.kirupa.com/u/rgraley)\
**Post date:** [May 6, 2005, 5:29pm UTC](https://forum.kirupa.com/t/infinite-menu-scrolling-issue/89283/1 "2005-05-06T17:29:21Z")

</div>

I’m new to actionscript

I have followed the Infinite Menu tutorial with success. However I want to have the scrolling action reverse directions. For example if I move my mouse to the left the scrolling goes to the right or vice versa. This is probably an easy fix however I’m not getting it to work. Here is the code

onClipEvent (load) {  
xcenter = 444.8;  
speed = .0030;  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
\_x += (distance_speed);  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
\_x += (distance_speed);  
if (\_x\>0) {  
\_x = -889.5;  
}  
if (\_x\<-889.5) {  
\_x = 0;  
}  
}  
Note clip with is 889.5 and mid is 444.8

If this has already been answered please send me a link

Thanks
