Hi everyone:
I’ve done a navigation bar (actually there are 2 of them, one over another), and have a movie clip (a semi-transparent rectangle) that follows mouse. Each navigation bar has its own “follower”. The hard thing for me to figure out is to determine a range in Y axis that tells this semi-transparent rectangle to appear and disappear. Here is the code for the bottom MC:
[font=Courier New]onClipEvent (load) {[/font]
[font=Courier New]_x = 0;[/font]
[font=Courier New]speed = 8;[/font]
[font=Courier New]}[/font]
[font=Courier New]onClipEvent (enterFrame) {[/font]
[font=Courier New]endX = _root._xmouse;[/font]
[font=Courier New]endY = _root._ymouse;[/font]
[font=Courier New]_x += (endY - _x)/speed;[/font]
[font=Courier New]if (endY >= 230){[/font]
[font=Courier New]_root.follower2.gotoAndPlay(“rollover”)[/font]
[font=Courier New]}[/font]
[font=Courier New]if (endY <= 260){[/font]
[font=Courier New]_root.follower2.gotoAndPlay(“rollout”)[/font]
[font=Courier New]}[/font]
[font=Courier New]}[/font]
The top MC has the same code, except for the values in the conditionals:
[font=Courier New]if (yfinal >= 200){
_root.follower1.gotoAndPlay(“rollover”)
}
if (yfinal <= 230){
_root.follower1.gotoAndPlay(“rollout”)
}
}[/font]