I adapted the example on the following page to show you a quick test:
http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7f4a.html
I changed the drawLayout function to highlight the word "renderer" in red. You need to import TextFormat and TextField classes too.override protected function drawLayout():void {
textField.width = this.width;
var text:String = textField.text;
var tf:TextFormat = textField.getTextFormat();
var redIdx:int = text.indexOf("renderer");
if (-1 != redIdx) {
tf.color = 0xff0000;
}
TextField(textField).setTextFormat(tf, redIdx, (redIdx + 8));
super.drawLayout();
}
Try that...