Set the Style Properties for Text Ranges
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:VBox >
<mx:Script>
import mx.controls.textClasses.TextRange;
private function alterTextSnapshot():void
{
var textRange:TextRange = new TextRange(area, true, area.selectionBeginIndex, area.selectionEndIndex);
textRange.color = 0xff0000;
textRange.letterSpacing = 3;
}
</mx:Script>
<mx:TextArea change="alterTextSnapshot()" id="area" text="this is a test" width="200" height="50"/>
</mx:VBox>
</mx:Application>
Related examples in the same category