# Vertical Slider Menu

**URL:** https://forum.kirupa.com/t/vertical-slider-menu/15143
**Category:** flash
**Created:** [March 11, 2003, 6:32am UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143 "2003-03-11T06:32:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![slayerment](https://avatars.discourse-cdn.com/v4/letter/s/a6a055/32.png) [@slayerment](https://forum.kirupa.com/u/slayerment)
#### Post date: [March 11, 2003, 6:32am UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/1 "2003-03-11T06:32:21Z")

</div>

Does anybody know how this slider increases in speed gradually as you move your cursor left or right? I’ve been looking through the code and can’t really figure it out.  
[http://www.actionscript.org/tutorials/advanced/ADVANCED\_SLIDER\_MENU/index.shtml](http://www.actionscript.org/tutorials/advanced/ADVANCED_SLIDER_MENU/index.shtml)  
Thanks!

---

<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: [March 11, 2003, 9:17pm UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/2 "2003-03-11T21:17:33Z")

</div>

I don’t know about that specific .fla but perhaps this could help;

onClipEvent (load)  
{  
xcenter=150;  
//the center of the scroling movie

speed=1/10;  
// the normal speed in wich the movie will move  
}

onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
//this gets the distance of the mouse from the disignated center of the movie  
\_x+=(distance\*speed);  
//this applies the appropriate motion as a \*\*\*\*ing of speed and distance from the conter  
}

Hope that helps 😏

---

<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: [March 11, 2003, 10:50pm UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/3 "2003-03-11T22:50:30Z")

</div>

> \*Originally posted by DeV \*  
> \*\*I don’t know about that specific .fla but perhaps this could help;

onClipEvent (load)  
{  
xcenter=150;  
//the center of the scroling movie

speed=1/10;  
// the normal speed in wich the movie will move  
}

onClipEvent (enterFrame)  
{  
var distance=\_root.\_xmouse-xcenter;  
//this gets the distance of the mouse from the disignated center of the movie  
\_x+=(distance\*speed);  
//this applies the appropriate motion as a \*\*\*\*ing of speed and distance from the conter  
}

Hope that helps 😏 \*\*

Aka…

> **[kirupa.com - Create the Infinite Menu](https://www.kirupa.com/developer/mx/infinite.htm)**
>
> Learn how to create the coolest navigation effect, the infinite menu.

---

<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: [March 11, 2003, 10:56pm UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/4 "2003-03-11T22:56:02Z")

</div>

Look at frame 2 in the scripts layer where it tells you:

```auto
startDrag("dragControl", true);

```

And then there is a movie clip with an instance name of _dragControl_ so click on it and view the script on frame 1:

```auto
drag = "/dragControl";
/:w = getProperty("/nav", _width);
/:xPos = getProperty(drag, _x);
/:yPos = getProperty(drag, _y);
/:yPos = /:yPos - 200;
/:xPos = /:xPos - 350;
**[color=red]speed = 45;[/color]**
setProperty("/nav", _x, getProperty("/nav", _x) - (/:xPos / speed));
if (Number(getProperty("/nav", _x)) < Number(-(/:w / 2))) {
	setProperty("/nav", _x, 0.01);
} else if (Number(getProperty("/nav", _x)) > 0) {
	setProperty("/nav", _x, -/:w / 2);
}

```

The speed is in there and the you can edit it with that, hope this helped!

By the way, this is all Flash 4 syntax so it looks very messy!

---

<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: [March 12, 2003, 1:21am UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/5 "2003-03-12T01:21:54Z")

</div>

> \*Originally posted by lostinbeta \*  
> \*\*Aka…

[kirupa.com - Create the Infinite Menu](http://www.kirupa.com/developer/mx/infinite.htm) \*\*

well… yea

---

<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: [March 12, 2003, 1:25am UTC](https://forum.kirupa.com/t/vertical-slider-menu/15143/6 "2003-03-12T01:25:58Z")

</div>

WOW GUYS! YOU ALL RULE! THIS WORKS LIKE A CHARM! 🙂 🙂
