1 Reply Latest reply on Dec 21, 2006 6:56 AM by awclemen

    Changing the color of a string

    xyco45 Level 1
      var stringTest:String = "Hello World";
      What would I use to make it so that when I use this variable like in a TextArea or something it will display "Hello World" in a different color?
        • 1. Re: Changing the color of a string
          Level 1
          you can change the color of the text of the entire text area by setting the style:

          var textArea:TextArea = new TextArea();
          textArea.setStyle("color", "#FF0000");

          However, I'm not sure you can change the color of only some of the text. I believe it is all or nothing. I'm sure someone will correct me here if I am wrong.

          --Andy