Ignore the settings for the min and max Y postion, I need to refigure those out.
Anyway, each clip is positioned appoximately 20 pixels apart on the Y.
So, when they follow the mouse, I would like the separation to remain - meaning the never sit at the same x position. Also, if you go to this URL to see it - http://members.rogers.com/limee/test/navigation.html - you’ll note that its pretty difficult to perform the rollover function (it works fine without the mouse follow).
I think that’s it. I half asleep so I may have more in the morgan.
The buttons are offset from your mouse, this means that as the mouse approaches them, there is no way it can catch up, because they move away from the mouse.
YOu could prevent this by A)Making them stop moving at a certain point or B)Not have them move away from the mouse (lol).
*Originally posted by lostinbeta *
**
YOu could prevent this by A)Making them stop moving at a certain point or B)Not have them move away from the mouse (lol). **
Thanks for the tips. I need 'um. Not going as well as I thought, but lack of sleep may be the culprit.
you can define a maxhigh y position and a maxlow y position and use if statements to stop them at each of the points so they don’t go any further from the mouse (or just a maxlow position really)
I’ve just reformatted the AS to make more sense and combined on ClipEvents … here’s the code now.
// Detect Y coordinate of mouse and follow
onClipEvent (enterFrame) {
speed = 5;
endY = _root._ymouse;
_y += (endY-_y)/speed;
if (this._y<- 80) {
this._y = - 80;
}
if (this._y>143) {
this._y = 143;
}
}
Okay, so here’s what I need to figure out. I still have the same problems as last night, i.e. the boxes never reach the mouse pointer so the user won’t be able to activate the button.
Let’s sort that first.
Now, you mentioned something about Maxhigh and Max low … is this what I need to implement next to make the buttons able to reach the pointer.
Btw, truely, thanks for the help here, i’m sure you got better things to do, so I really appreciate it. It helps having someone actually guide you through as opposed to doing a tut.
Plus, I prefer to work it out myself so that I understand it better.
YP
Ok, because your situation is that your boxes move away from your mouse, by defining contraints to how far the boxes can go will allow you to catch up to them because they will stop at a certain point.
I think I’ve done it. I didn’t actually have to change any of the AS, I just had to take all the MC’s out of an MC and drop them individually on the timeline.
Sorry I didn’t notice your second script was different from your first. Your first script had the buttons offset from the mouse so you could never touch them (as in the example link you showed).
Not sure what you mean about taking an mc out of an mc and placing it on the maintimeline and it worked.
If it was what I am thinking of, that really makes no sense.
I’m not suprised that I’m confusing you. It’s hard to explain stuff when you barely understand it yourself.
I’ll try and explain the structure I had and now have.
HAD
Originally, I had my main MC which was called Navigation. Within that MC, I had my three MC’s that act as the navigation for the site (i.e. section 1, 2 and 3). On each of those MC’s (the 3), I was assigning the AS we’ve been going over.
NOW HAVE
I have completely omitted the main MC and just dropped the 3 MCs on the main stage timeline and again applied the AS to them.