# How to repeat the actions of this button?

**URL:** <https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748>\
**Category:** flash\
**Created:** [August 31, 2004, 2:06am UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748 "2004-08-31T02:06:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jjmancini](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jjmancini](https://forum.kirupa.com/u/jjmancini)\
**Post date:** [August 31, 2004, 2:06am UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748/1 "2004-08-31T02:06:26Z")

</div>

Hey everyone!

How to repeat the actions of this button?  
[http://www.constructiondurable.com/indexflash.htm](http://www.constructiondurable.com/indexflash.htm)

Notice the tabs on the left hand side. Go ahead and mouse over them.

Any info would be great!  
Thanks!

jjmancini

---

<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:** [September 1, 2004, 11:53pm UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748/2 "2004-09-01T23:53:41Z")

</div>

mc is the movieclip on stage. It’s pretty self explanatory otherwise. you can use the easeTo method to make your own tab movement, or use the wrapper easeInOut I provided. drag in is the drag that will effect the clip on rollover, drag out is the drag that will effect the clip on roll out. xdist and ydist are the \_x and \_y offset for the tab movement. You don’t have to use the y value if you want to duplicate the effect on the page.

```auto

MovieClip.prototype.easeTo = function(drag, distx, disty){
	var xtar = this._x + distx;
	var ytar = this._y + disty;
	this.onEnterFrame = function(){
		this._y+=(ytar - this._y)/drag;
		this._x+=(xtar - this._x)/drag;
	}
	
}

MovieClip.prototype.easeInOut = function(dragin, dragout, xdist, ydist){
	this.onRollOver=function(){
		this.easeTo(dragin, -xdist, ydist);
	}
	this.onRollOut = function(){
		this.easeTo(dragout, xdist, -ydist);
	}
}

mc.easeInOut(8, 4, 20, 0);

```

it’s pretty rough, so you might need to work on it a bit.

---

<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:** [September 2, 2004, 12:03am UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748/3 "2004-09-02T00:03:05Z")

</div>

Awesome! That is perfect Thanks so much APDesign!  
This will work perfect!

---

<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:** [September 2, 2004, 12:31am UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748/4 "2004-09-02T00:31:55Z")

</div>

No problem, just make sure you understand how it works 😉

---

<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:** [September 2, 2004, 7:47am UTC](https://forum.kirupa.com/t/how-to-repeat-the-actions-of-this-button/62748/5 "2004-09-02T07:47:50Z")

</div>

which one(button) do you mean?the one that says ‘envover’ and ‘imprimer’?i mouse over it and nothing happens…
