# Help with a Text Format on a Button

**URL:** <https://forum.kirupa.com/t/help-with-a-text-format-on-a-button/210627>\
**Category:** flash\
**Created:** [December 20, 2006, 2:21pm UTC](https://forum.kirupa.com/t/help-with-a-text-format-on-a-button/210627 "2006-12-20T14:21:49Z")\
**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, 2:21pm UTC](https://forum.kirupa.com/t/help-with-a-text-format-on-a-button/210627/1 "2006-12-20T14:21:49Z")

</div>

Hello,

I don’t really know how to compose this question, bear with me…

Here is the code that I am using right now. Works fine. When the button has been selected I would like the button to reflect that selection with a color change. In other words remain highlighted.

EDIT: this would be the “down” state if you were to use a button symbol.

Thanks,

Ponyack

```auto
// text formatting

// 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);

```
