I’ll paste the script that I have that controls a back and forth scrolling of the navigation bar.
Unfortunately, I didn’t write the code for this site and the guy who did is a more advanced Action Scripter, and he’s pretty much unreachable.
What I can’t seem to figure out is how to make it such that once the mouse goes out of the navigation area, I need it to scroll itself back to the origin.
Please help!
// Scroll Code
this.onEnterFrame = function() {
scroll_speed = 10;
if ((_root.mainMc.navMc._ymouse>=navMain._y) && (_root.mainMc.navMc._ymouse<=navMain._y+navMain._height)) {
//trace("In the zone");
if ((_root.mainMc.navMc._xmouse>=(hit_right._x-100)) && (navMain.hitTest(hit_right))) {
navMain._x -= scroll_speed;
} else if ((_root.mainMc.navMc._xmouse<=(hit_left._x+100)) && (navMain.hitTest(hit_left))) {
navMain._x += scroll_speed;
}
// set the boundries
if (navMain._x < -490) {navMain._x=-490;}
if (navMain._x > -210) {navMain._x=-210;}
} else {
null;
//trace("not in the zone");
//delete this.onEnterFrame;
}
};