# Slider menu

**URL:** https://forum.kirupa.com/t/slider-menu/136075
**Category:** Uncategorized
**Created:** [February 2, 2005, 2:20am UTC](https://forum.kirupa.com/t/slider-menu/136075 "2005-02-02T02:20:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![moman](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@moman](https://forum.kirupa.com/u/moman)
#### Post date: [February 2, 2005, 2:20am UTC](https://forum.kirupa.com/t/slider-menu/136075/1 "2005-02-02T02:20:48Z")

</div>

Hello all

I was wondering if anyone could help with this.  
I am trying to create the slider and want the slider to stop sliding once the mouse rolls off the area of the movie.  
I have this for the code right now, it doesn’t stop when u move ur mouse from the slider.

onClipEvent (load) {  
xcenter = 510;  
speed = 1/50;  
}  
onClipEvent (enterFrame) {  
var distance = \_root.\_xmouse-xcenter;  
\_x += -(distance\*speed);  
if (\_x\>324) {  
\_x = 324;  
}  
if (\_x\<-576) {  
\_x = -576;  
}  
}

can anyone help me with this?

thanks,  
moman
