I need to make the arrow follow the mouse when I move it throught the bottons, now is moving but with a predetermined move, to be honest I dont have a clue, I searched but no luck, maybe someone can help me or point me out to a tutorial, thanks!
ok that helped but I dont want to make the arrow follow me around, how can I make that the arrow stays in place and just move like in the example in the first post, in a define area, I dont know if I explained it well…
Oh sorry, what you need is something that eases the needle to the button on rollover. For that you should use Voetsjoeba’s patented easing formula:
MovieClip.prototype.ease = function(x,y){
this.onEnterFrame = function(){
this._x = x-(x-this._x)/1.1;
this._y = y-(y-this._y)/1.1
if(this._x > x-1 && this._x < x+1 && this._y > y-1 && this._y < y+1){
this._x = x;
this._y = y;
delete this.onEnterFrame
//do other stuff here, this is the point at which the object reaches its target
}
}
}
MC.ease(100,100);
where MC would be the name of the needle and the coordinates are for the button you want the needle to ease to. Put the AS on the maintimeline but call the function on rollover of your button. Also, instead of hard numbers for the coordinates you can use the _x and _y positions of your button - that way if you ever move the buttons around you don’t have to worry about changing those numbers. Note - if you do it that way you should make your registration point of your button at the center.
thanks lunatic, I put the AS on the main timeline and changed the name of the MC but I dont now how to call the function when I rollover the button…? :puzzled: Teach me please! :trout:
Ack Stringy is right. I forgot the needle has one end that moves and the other end stays stationary. That makes it more difficult. Well, not more difficult but requires more math. :ro:
but thanks stringy - you’ve been really on top of stuff recently! Every time I go to try and help someone it seems like I’m 5 minutes behind you! :love: