# Enable Disbale buttons

**URL:** <https://forum.kirupa.com/t/enable-disbale-buttons/210651>\
**Category:** flash\
**Created:** [December 20, 2006, 6:10pm UTC](https://forum.kirupa.com/t/enable-disbale-buttons/210651 "2006-12-20T18:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponyack](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@ponyack](https://forum.kirupa.com/u/ponyack)\
**Post date:** [December 20, 2006, 6:10pm UTC](https://forum.kirupa.com/t/enable-disbale-buttons/210651/1 "2006-12-20T18:10:48Z")

</div>

Figured out what I am trying to do here. below is the code. Whats next to get this to work

any ideas of a tutorial would be great. I have been looking but it seems like there are several ways to do this.

basically I have one MC that has the code. I load the name of each button fro a text file.

There are 4 instances of this button on the stage

okay, thanks

```auto
// default text style

textStyle = new TextFormat();
textStyle.color = 0x000000;

// rollover style
rolloverStyle = new TextFormat();
rolloverStyle.color = 0xFF0000;

btn.onRollOver = function(){
    // change Services text color to red
    btnLabel.setTextFormat(rolloverStyle);
}
btn.onRollOut = function(){
    // change Services text back to black
    btnLabel.setTextFormat(textStyle);
}

```
