# Help: menu with slider- include y position?

**URL:** <https://forum.kirupa.com/t/help-menu-with-slider-include-y-position/227214>\
**Category:** Uncategorized\
**Created:** [May 28, 2007, 3:53pm UTC](https://forum.kirupa.com/t/help-menu-with-slider-include-y-position/227214 "2007-05-28T15:53:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![as1714](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@as1714](https://forum.kirupa.com/u/as1714)\
**Post date:** [May 28, 2007, 3:53pm UTC](https://forum.kirupa.com/t/help-menu-with-slider-include-y-position/227214/1 "2007-05-28T15:53:48Z")

</div>

hello wise forum-

i’m using a tutorial from this site to build a menu with a sliding bar that follows the mouse to a button location- tutorial and code is here: [http://tinyurl.com/2avju6](http://tinyurl.com/2avju6)

it’s simple, lovely, and working (yay!) however, my menu crosses 2 lines, the example has just a single line.

how can i get the slider to jump down to the next line below and align with the buttons there?

here’s the basic code with my [COLOR=Blue]nonfunctioning[/COLOR] additions:

easeSpeed = 5;  
slider\_mc.onEnterFrame = function() {

this.\_x += (xMove1-this.\_x)/easeSpeed;  
[COLOR=Blue]this.\_y += (yMove1-this.\_y)/easeSpeed;[/COLOR]  
};  
button\_1.onPress = function() {

xMove = button\_1.\_x;  
};

button\_2.onPress = function() {

xMove = button\_2.\_x;  
};

button\_3.onPress = function() {

xMove = button\_3.\_x;  
[COLOR=Blue] yMove = button\_3.\_y; //actually at button 4 i move to the next line[/COLOR]  
};

then for the buttons:

on (rollOver) {

slider.xMove = button\_3.\_x;  
[COLOR=Blue]slider.yMove = button\_3.\_y;[/COLOR]  
}

um… i think my logic is off here. :pa:  
help!

thanks–  
alex
