# Click a button and change the color of the button name

**URL:** https://forum.kirupa.com/t/click-a-button-and-change-the-color-of-the-button-name/2724
**Category:** Uncategorized
**Created:** [April 29, 2002, 12:24am UTC](https://forum.kirupa.com/t/click-a-button-and-change-the-color-of-the-button-name/2724 "2002-04-29T00:24:57Z")
**Posts on this page:** 1
**Page:** 1

<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: [April 29, 2002, 12:24am UTC](https://forum.kirupa.com/t/click-a-button-and-change-the-color-of-the-button-name/2724/1 "2002-04-29T00:24:57Z")

</div>

Hi! All,\r\rI’ve a question and think several days still can’t solve it. Appreciate if somebody can help me.\r\rThere are about 20 buttons and every button has it’s name. I want to click buttonA and buttonA\_name change color to red. When I click another button, say buttonF, buttonF\_name change color to red and the buttonA\_name change color back to black.\r\rI set button\_name a MC with two layers, upper layer is black color and lower layer is red color. When I click a button I fade the upper layer and we see the color red for the button\_name. When I click another button I need to fade back the button I just clicked. \r\rIt will be okay if there are just a few buttons. It might be not a good idea for many buttons because I have to set every button something like that :\r\ron (realeas){\r buttonA.buttonA\_black.\_fade=0;\r buttonB.buttonB\_black.\_fade=1;\r buttonC.buttonC\_black.\_fade=1;\r .\r .\r .\r}\r\rWhat I want is the button\_name a little bit intelligent. For example, when I click btutonA, I set a variable m to 1, and then the buttonA\_name change color to red and change back to black if m\<\>1. I tried to put the script in the button\_name MC or other place but all not working. Appreciate your help…\r\rJames\r\r\r\r
