# Infinite menu, but different approach

**URL:** <https://forum.kirupa.com/t/infinite-menu-but-different-approach/177130>\
**Category:** flash\
**Created:** [January 30, 2006, 2:47pm UTC](https://forum.kirupa.com/t/infinite-menu-but-different-approach/177130 "2006-01-30T14:47:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![timB](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@timB](https://forum.kirupa.com/u/timB)\
**Post date:** [January 30, 2006, 2:47pm UTC](https://forum.kirupa.com/t/infinite-menu-but-different-approach/177130/1 "2006-01-30T14:47:15Z")

</div>

Hello all,

I have a vertical menu containing 6 items (buttons). I’d like to have it loop: Ex: When I press button one, it animates up and off the top of the page and reappears at the bottom. Like wise, if I hit button three, all buttons eill move up and one, two, three ‘reappear’ at the bottom.

Here is the code:  
// make navigation, clips move about  
function MoveTo (clip, yTo, speed)  
{  
clip.onEnterFrame = function ()  
{  
this.\_y += (yTo - this.\_y) \* speed;  
};  
}

// main navigation button behavior  
mainNav.button1.onPress = function ()  
{  
MoveTo (mainNav, -18, 0.15);  
};  
stop();

I’ve attached an MX 04 file as well. I’d be aternally grateful to anyone who can help. 🙂

Many thanks in advance

T
