# Two buttons in two mc's

**URL:** <https://forum.kirupa.com/t/two-buttons-in-two-mcs/32804>\
**Category:** Uncategorized\
**Created:** [October 11, 2003, 12:07pm UTC](https://forum.kirupa.com/t/two-buttons-in-two-mcs/32804 "2003-10-11T12:07:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seticus](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Seticus](https://forum.kirupa.com/u/Seticus)\
**Post date:** [October 11, 2003, 12:07pm UTC](https://forum.kirupa.com/t/two-buttons-in-two-mcs/32804/1 "2003-10-11T12:07:52Z")

</div>

Strange, but I have never before noticed this problem, maybe you guys can help me:

I’ve got two movieclips, containing each two buttons. I was thinking about giving the buttons the following AS:

[AS]  
on (keyPress “+”) {  
if (pushed == true) {  
startDrag("\_root.mc2");  
pushed = false;  
} else if (pushed == false) {  
stopDrag();  
pushed = true;  
}  
}  
[/AS]

for the button in “mc2” and

[AS]  
on (keyPress “+”) {  
if (pushed == true) {  
startDrag("\_root.mc1");  
pushed = false;  
} else if (pushed == false) {  
stopDrag();  
pushed = true;  
}  
}  
[/AS]  
for the button in “mc1”.

In the first frame in the root:

[AS]  
mc1.pushed = true;  
mc2.pushed = true;  
[/AS]

This won’t work, because flash doesn’t know which mc he has to move when “+” is pressed, but I still want this to work. Any ideas? It’s weird, when you want to drag one, you always start dragging the lower one…
