# Changing text format for portion of text

**URL:** https://forum.kirupa.com/t/changing-text-format-for-portion-of-text/308026
**Category:** flash
**Created:** [April 15, 2010, 12:26pm UTC](https://forum.kirupa.com/t/changing-text-format-for-portion-of-text/308026 "2010-04-15T12:26:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)
#### Post date: [April 15, 2010, 12:26pm UTC](https://forum.kirupa.com/t/changing-text-format-for-portion-of-text/308026/1 "2010-04-15T12:26:09Z")

</div>

I have a textfield with 6 lines of text. Is there a way to change the color and maybe the size of ONE word within this textfield? When the user clicks a button I want a certain word to stand out. Then when they click again I want that word to go back to normal and have another word change.

Like this.

```auto

var string3:String = "SERVICE_NAME : messenger";

```

[COLOR=red]SERVICE\_NAME[/COLOR] : messenger //First click  
SERVICE\_NAME [COLOR=red]: messenger [/COLOR][COLOR=black]//Second click[/COLOR]

Thanks in advance.

MH
