Ok, i've been thinking about what my next site is gonna look like. I'm trying to come up with a navigation. And I like this idea http://www.studioah.com/ah1/ for the menu. I know how to approach it. Multiple mc's with the buttons inside. The code i'm gonna use to make the button list scroll up and down with the mouse is slightly modified version of this:


Mid = 80;
Mouse = _root._ymouse;
diff = Mid-Mouse;
Move = diff/20;
_root.mainmenu._y = _root.mainmenu._y+Number(Move);

My question is that I want to restrict the scroller from moving up or down once it reaches the end of the menu. I'm gonna put the menu into a window pane and once the menu reaches the top or bottom of that pane I dont want it to scroll anymore up or down.

I know I need to add bounds to the above code that once _root.mainmenu._y > (something) I guess sine the height of my movie is 165 and half is around 80 than I need something like:

if _root.mainmenu.y > 90

but I dont know what command I need to stop the menu's Y position from moving any higher. And this is the same thing if it were going down.

Any help on the actionscripting i'm looking for? Any help would be appreciated.

p.s. I can get the button and the menu to scroll without a problem its just I dont want it to scroll up or down past a certain distance.