# Text color and AS

**URL:** <https://forum.kirupa.com/t/text-color-and-as/180688>\
**Category:** flash\
**Created:** [March 2, 2006, 6:35pm UTC](https://forum.kirupa.com/t/text-color-and-as/180688 "2006-03-02T18:35:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zimmermann](https://avatars.discourse-cdn.com/v4/letter/z/f19dbf/32.png) [@Zimmermann](https://forum.kirupa.com/u/Zimmermann)\
**Post date:** [March 2, 2006, 6:35pm UTC](https://forum.kirupa.com/t/text-color-and-as/180688/1 "2006-03-02T18:35:59Z")

</div>

I have this text String in an Array. It’ll be sent to a TextField, but first I’d like to change the color of one of the letters. Like this:

[FONT=Courier New]some\_array = [COLOR=#000000][[/COLOR][COLOR=#ff0000]“This i\<font color=’#000000’\>s\</font\> an example”[/COLOR][COLOR=#000000]][/COLOR];

[/FONT]  
But I’d like to do it with actionscript, so I can enter a number and one of the letters changes color. In this example the number is 7, since ‘s’ is the 7th letter.

How would one do that? 🙂
