# Help! Infinite menu help!

**URL:** https://forum.kirupa.com/t/help-infinite-menu-help/320911
**Category:** Uncategorized
**Created:** [April 5, 2011, 1:52pm UTC](https://forum.kirupa.com/t/help-infinite-menu-help/320911 "2011-04-05T13:52:13Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![carlhughes23](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@carlhughes23](https://forum.kirupa.com/u/carlhughes23)
#### Post date: [April 5, 2011, 1:52pm UTC](https://forum.kirupa.com/t/help-infinite-menu-help/320911/1 "2011-04-05T13:52:13Z")

</div>

Hi guys,

really need help with the code below, I need the code to ease to a stop rather than an abrupt stop!

Can anyone help?

Thanks in advance.

onClipEvent (load) {  
xcenter = 326;  
speed = 1 / 10;  
}  
onClipEvent (mouseDown) {  
dragging = true;  
}  
onClipEvent (mouseUp) {  
dragging = false;

}

onClipEvent (enterFrame) {  
if (dragging) {  
var distance = \_root.\_xmouse - xcenter;  
\_x += (distance \* speed);  
if (\_x \> -325) {  
\_x = -1305;  
}  
if (\_x \< -1305) {  
\_x = -325;  
}  
}  
}
