# Duplicate buttons acting the same

**URL:** <https://forum.kirupa.com/t/duplicate-buttons-acting-the-same/224313>\
**Category:** Uncategorized\
**Created:** [May 1, 2007, 3:51am UTC](https://forum.kirupa.com/t/duplicate-buttons-acting-the-same/224313 "2007-05-01T03:51:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![exxie](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@exxie](https://forum.kirupa.com/u/exxie)\
**Post date:** [May 1, 2007, 3:51am UTC](https://forum.kirupa.com/t/duplicate-buttons-acting-the-same/224313/1 "2007-05-01T03:51:52Z")

</div>

See attached file. I’m trying to get a set of 3 buttons and their duplicates to act the same on actionscript events. 3 buttons working the same way (each button group should simultaneously rollover, rollout, and release at the same time. The file attached does start to work but I will need 3 unique button names.

Here’s the original tutorial I’m trying to rework:  
[http://www.fireflytutorials.com/flash-tutorials/dynamic-navigation-menu/](http://www.fireflytutorials.com/flash-tutorials/dynamic-navigation-menu/)

I attached the fla

stop();

function reActivateMenu () {

```
     button1_mc.gotoAndStop(1);
     button1_mc.enabled = true;
     button2_mc.gotoAndStop(1);
     button2_mc.enabled = true;
     button3_mc.gotoAndStop(1);
     button3_mc.enabled = true;
	 
	 button1_mc2.gotoAndStop(1);
     button1_mc2.enabled = true;
     button2_mc2.gotoAndStop(1);
     button2_mc2.enabled = true;
     button3_mc2.gotoAndStop(1);
     button3_mc2.enabled = true;

	 }

```

// ---- onRollOver, onRollOut, and onRelease event handlers for the buttons

button1\_mc2.onRollOver = function() {  
this.gotoAndStop(2);  
};  
button1\_mc.onRollOver = function() {  
this.gotoAndStop(2);  
button1\_mc2.onRollOver();  
};  
button1\_mc2.onRollOut = function() {  
this.gotoAndStop(1);  
};  
button1\_mc.onRollOut = function() {  
this.gotoAndStop(1);  
button1\_mc2.onRollOut();  
};  
function r() {  
reActivateMenu();  
button1\_mc.gotoAndStop(3);  
button1\_mc.enabled = false;  
button1\_mc2.gotoAndStop(3);  
button1\_mc2.enabled = false;  
contentBox\_mc.gotoAndStop(1);  
};  
button1\_mc.onRelease = button1\_mc2.onRelease = r

///

button2\_mc2.onRollOver = function() {  
this.gotoAndStop(2);  
};  
button2\_mc.onRollOver = function() {  
this.gotoAndStop(2);  
button2\_mc2.onRollOver();  
};  
button2\_mc2.onRollOut = function() {  
this.gotoAndStop(1);  
};  
button2\_mc.onRollOut = function() {  
this.gotoAndStop(1);  
button2\_mc2.onRollOut();  
};  
function r() {  
reActivateMenu();  
button2\_mc.gotoAndStop(3);  
button2\_mc.enabled = false;  
button2\_mc2.gotoAndStop(3);  
button2\_mc2.enabled = false;  
contentBox\_mc.gotoAndStop(2);  
};  
button2\_mc.onRelease = button2\_mc2.onRelease = r

///

button3\_mc2.onRollOver = function() {  
this.gotoAndStop(2);  
};  
button3\_mc.onRollOver = function() {  
this.gotoAndStop(2);  
button3\_mc2.onRollOver();  
};  
button3\_mc2.onRollOut = function() {  
this.gotoAndStop(1);  
};  
button3\_mc.onRollOut = function() {  
this.gotoAndStop(1);  
button3\_mc2.onRollOut();  
};  
function r() {  
reActivateMenu();  
button3\_mc.gotoAndStop(3);  
button3\_mc.enabled = false;  
button3\_mc2.gotoAndStop(3);  
button3\_mc2.enabled = false;  
contentBox\_mc.gotoAndStop(3);  
};  
button3\_mc.onRelease = button3\_mc2.onRelease = r

hope the helppps!  
exxie
