Mouse activated scrolling navigation in Flash MX
Posted on 2006-07-13
I’m trying to create a vertical navigation bar that scrolls back and forth along the y axis in response to the movement of the mouse. There is a catch, however… It can only scroll when the mouse is over the navigation. I have other objects elsewhere on the stage that respond to mouse movements and I’ve found that it can be quite distracting to have the navigation scrolling while I navigate other parts of the stage.
Here’s the script which is applied to the navigation mc:
if (_y > 0) _y=-513;
if (_y < -513) _y=0;
My question is, how should I modify this code so that the navigation only scrolls while the mouse is over it.
Expert assistance is always appreciated.