# Mouse trailer

**URL:** <https://forum.kirupa.com/t/mouse-trailer/33309>\
**Category:** Uncategorized\
**Created:** [October 17, 2003, 4:47pm UTC](https://forum.kirupa.com/t/mouse-trailer/33309 "2003-10-17T16:47:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_wulfwud](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@g\_wulfwud](https://forum.kirupa.com/u/g_wulfwud)\
**Post date:** [October 17, 2003, 4:47pm UTC](https://forum.kirupa.com/t/mouse-trailer/33309/1 "2003-10-17T16:47:40Z")

</div>

ei…i kinda wonder what its called, the line in [this site’s](http://giovannidipalma.irisnet.it/home.html) 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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 19, 2003, 8:46am UTC](https://forum.kirupa.com/t/mouse-trailer/33309/2 "2003-10-19T08:46:55Z")

</div>

yay! thanks man! but how do i do it in a separate MC?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 19, 2003, 9:05am UTC](https://forum.kirupa.com/t/mouse-trailer/33309/3 "2003-10-19T09:05:52Z")

</div>

Put what in a seperate MC ? The whole effect ? The code ? The bar ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2004, 4:19am UTC](https://forum.kirupa.com/t/mouse-trailer/33309/4 "2004-02-05T04:19:54Z")

</div>

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… 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2004, 7:52pm UTC](https://forum.kirupa.com/t/mouse-trailer/33309/5 "2004-02-05T19:52:24Z")

</div>

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.

```auto

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:

```auto

button1.onRelease = function(){
path_to_bar.easeX(this._x);
}
button2.onRelease = function(){
path_to_bar.easeX(this._x);
}
//....

```

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 5, 2004, 8:42pm UTC](https://forum.kirupa.com/t/mouse-trailer/33309/6 "2004-02-05T20:42:38Z")

</div>

I just used the tut example and subed the \_mouse by the x position of the button

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 6, 2004, 1:14am UTC](https://forum.kirupa.com/t/mouse-trailer/33309/7 "2004-02-06T01:14:25Z")

</div>

thanks for the quick reply…ill try that when i get home… 🙂
