# Changing colors of two instances in a single click

**URL:** <https://forum.kirupa.com/t/changing-colors-of-two-instances-in-a-single-click/286028>\
**Category:** Uncategorized\
**Created:** [April 8, 2009, 10:17pm UTC](https://forum.kirupa.com/t/changing-colors-of-two-instances-in-a-single-click/286028 "2009-04-08T22:17:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fandalis](https://avatars.discourse-cdn.com/v4/letter/f/6f9a4e/32.png) [@fandalis](https://forum.kirupa.com/u/fandalis)\
**Post date:** [April 8, 2009, 10:17pm UTC](https://forum.kirupa.com/t/changing-colors-of-two-instances-in-a-single-click/286028/1 "2009-04-08T22:17:34Z")

</div>

Hi guys,  
Can i change the colors of two mc’s if i just click one of them? i tried to put the other mc (btn02) inside the function but only btn01 changes color when i click it.

here’s the code;

var controlcolor:Color = new Color(btn01);  
var controlcolor2:Color = new Color(btn02);

btn01.onPress = function(){  
controlcolor.setRGB(0x000000);  
btn02.controlcolor2.setRGB(0x000000);  
}
