# Scrolling menu

**URL:** <https://forum.kirupa.com/t/scrolling-menu/309391>\
**Category:** Uncategorized\
**Created:** [May 13, 2010, 8:06pm UTC](https://forum.kirupa.com/t/scrolling-menu/309391 "2010-05-13T20:06:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fredperes](https://avatars.discourse-cdn.com/v4/letter/f/5f9b8f/32.png) [@fredperes](https://forum.kirupa.com/u/fredperes)\
**Post date:** [May 13, 2010, 8:06pm UTC](https://forum.kirupa.com/t/scrolling-menu/309391/1 "2010-05-13T20:06:44Z")

</div>

Hi!

I downloaded a file from Kirupa’s website: a scrolling menu. The user clicks in the button and the mc moves up or down. It’s great for what I need.

But… I need a vertical and horizontal move. Like a diagonal movement.

I’m trying and trying with no sucess. Could anybody give a clue?

I’m sending the file and here’s the code:

[http://www.fredperes.net/flash/scrolling.fla](http://www.fredperes.net/flash/scrolling.fla)

The mc that moves

## stop () ; //function that makes the movie move //move () makes it move smoothly, move2 () makes it move with an elastic effect MovieClip.prototype.move2 = function () { dest = \_root.ynew ; pos = this.\_y ; vel = vel\*0.7 + (dest-pos)/7 ; this.\_y += vel ; } MovieClip.prototype.move = function () { dest = \_root.ynew ; pos = this.\_y ; vel = (dest-pos)/7 ; this.\_y += vel ; }

The buttons:

on (press) {  
\_root.ynew = \_root.mask2.\_y+(-2-1)\*100/2;

}  
on (press) {  
\_root.ynew = \_root.mask2.\_y+(0-1)\*100/2;  
}

And so on…

Thanks!
