# Button color (rollover/AS)

**URL:** <https://forum.kirupa.com/t/button-color-rollover-as/179779>\
**Category:** flash\
**Created:** [February 22, 2006, 10:26pm UTC](https://forum.kirupa.com/t/button-color-rollover-as/179779 "2006-02-22T22:26:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![julyknive](https://avatars.discourse-cdn.com/v4/letter/j/e0b2c6/32.png) [@julyknive](https://forum.kirupa.com/u/julyknive)\
**Post date:** [February 22, 2006, 10:26pm UTC](https://forum.kirupa.com/t/button-color-rollover-as/179779/1 "2006-02-22T22:26:53Z")

</div>

My situation:

I have 3 **black** text buttons that have a \*\*colored rollover \*\*(I did this manually). After you click one button, it turns **grey**. I used the following code for this (for button1/3):

```auto

    btnColor = new Color(button1);
    btnColor.setRGB(0xCCCCCC);
    btnColor = new Color(button2);
    btnColor.setRGB(0x000000);
    btnColor = new Color(button3);
    btnColor.setRGB(0x000000);

```

As you can see, the others get black. I did this in case the user has clicked the specific buttons before, so that they get back the original color (black).

BUT, this disables the (manual made) button rollover color.  
How can I fix this?

Ps: I searched the net/kirupa/actionscriptdotorg (in a rush) for any tutorials but couldn’t find any.

Thanks!
