# Slider

**URL:** https://forum.kirupa.com/t/slider/35279
**Category:** flash
**Created:** [November 12, 2003, 9:31am UTC](https://forum.kirupa.com/t/slider/35279 "2003-11-12T09:31:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![emmett\_m](https://avatars.discourse-cdn.com/v4/letter/e/258eb7/32.png) [@emmett\_m](https://forum.kirupa.com/u/emmett_m)
#### Post date: [November 12, 2003, 9:31am UTC](https://forum.kirupa.com/t/slider/35279/1 "2003-11-12T09:31:02Z")

</div>

I am trying to make a sliding menu whose speed is responsive to \_xmouse (slow at the center and fast at the sides…) does it need to exist in two pieces? the problem is that it seems impossible to define 0(zero) as anything but just that… does this make sense to anyone?

---

<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: [November 12, 2003, 9:47am UTC](https://forum.kirupa.com/t/slider/35279/2 "2003-11-12T09:47:51Z")

</div>

if you are trying to make the center 0 but the 0 is located at the top left you could use:  
[AS]  
center = this.\_width/2;  
[/AS]  
then calculate speed by finding the distance between the mouse and center ie  
[AS]  
speed = abs(center-\_xmouse)/10;//less than 10 equals faster  
[/AS]  
hope that helps,  
Shawn

---

<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: [November 12, 2003, 6:44pm UTC](https://forum.kirupa.com/t/slider/35279/3 "2003-11-12T18:44:24Z")

</div>

thanks for your reply - I will try to use that somehow

---

<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: [November 13, 2003, 5:13pm UTC](https://forum.kirupa.com/t/slider/35279/4 "2003-11-13T17:13:08Z")

</div>

Did you read this?

[http://www.kirupa.com/developer/mx/infinite.htm](http://www.kirupa.com/developer/mx/infinite.htm)
