Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Changing text color in ActionScript

lakersfan741
Level 2
Level 2

Hello,

      I have a text control in my application and I want to change the text color to red whenever an error occurs. I googled around but no help.

Any help would be appreciated.

Thanks,

Bharani

1 Reply
Greg_Lafrance
Level 4
Level 4

var txt:Text = new Text();

txt.setStyle("color", "0xFF0000");

The setStyle() call is how you set style properties in ActionScript.

If this post answers your question or helps, please mark it as such.