Flash / Flex / ActionScript/TextField/color
Change TextField color
<source lang="java">
package{
import flash.display.Sprite; import flash.text.*; public class Main extends Sprite{ public function Main(){ var tContent:TextField = new TextField(); tContent.multiline = true; tContent.border = true; tContent.wordWrap = true; tContent.text = "red text"; var tfFormatter:TextFormat = new TextFormat(); tfFormatter.color = 0xFF0000; tContent.setTextFormat(tfFormatter); addChild(tContent); } }
}
</source>