# Sliding on the y Axis?

**URL:** <https://forum.kirupa.com/t/sliding-on-the-y-axis/96370>\
**Category:** Uncategorized\
**Created:** [December 8, 2003, 5:09pm UTC](https://forum.kirupa.com/t/sliding-on-the-y-axis/96370 "2003-12-08T17:09:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_red](https://avatars.discourse-cdn.com/v4/letter/d/eb8c5e/32.png) [@dr\_red](https://forum.kirupa.com/u/dr_red)\
**Post date:** [December 8, 2003, 5:09pm UTC](https://forum.kirupa.com/t/sliding-on-the-y-axis/96370/1 "2003-12-08T17:09:33Z")

</div>

Hey All,  
Happy Holidays! :?)

I finished Kirupa’s tutorial on the “Sliding Menu” and have a question for all you actionscript gurus…

The tutorial shows how to make the movie clip slide on the horizontal (x) but how do I configure the code to use both horizontal and vertical (y)?

I know this is asking for alot but I really am a novice at this actionscript stuff :bu:

Do I just add a dest=" \_root.ynew ;" and “pos = this.y ;” some how to this code?

stop () ;  
MovieClip.prototype.move2 = function () {  
dest = \_root.xnew ;  
pos = this.\_x ;  
vel = vel\*0.7 + (dest-pos)/6 ;  
this.\_x += vel ;  
}  
MovieClip.prototype.move = function () {  
dest = \_root.xnew ;  
pos = this.\_x ;  
vel = (dest-pos)/6 ;  
this.\_x += vel ;  
}

Here is a link to the tut:  
[http://www.kirupa.com/developer/flash5/slidingmenu.htm](http://www.kirupa.com/developer/flash5/slidingmenu.htm)

I’m just trying to learn,

Thanks for your help!  
-The Dr.
