ei…i kinda wonder what its called, the line in this site’s navigation…its the line that moves from left to right when the pointer moves in the mc…ive tried searching , but cant seem to find one…sorry…
yay! thanks man! but how do i do it in a separate MC?
Put what in a seperate MC ? The whole effect ? The code ? The bar ?
it’s like this… i have a navbar on one MC, and the effect on another <MC2>… what i want is when i mouseover on the buttons of the navbar, the trailer would follow only the thing is it would follow the button i have my pointer “mouseover-ed” with…
get it…sorry for the bad english…
Yes, I see. I’ve created an easing prototype which I think is of good use here. This code creates the prototype function and makes it available to all movieclips, and preferably goes on the first frame of your main movie so that all movieclips have access to this function from the first frame on.
MovieClip.prototype.easeX = function(x){
this.onEnterFrame = function(){
this._x = x-(x-this._x)/1.2;
if(this._x > x-1 && this._x < x+1){
delete this.onEnterFrame
}
}
}
On your timeline which your navigation buttons are in, you can then simply use this to make your bar ease to the button clicked:
button1.onRelease = function(){
path_to_bar.easeX(this._x);
}
button2.onRelease = function(){
path_to_bar.easeX(this._x);
}
//....
I just used the tut example and subed the _mouse by the x position of the button
thanks for the quick reply…ill try that when i get home…