import flash.display.Sprite; import flash.text.TextField; public class Main extends Sprite { public function Main( ) { var field:TextField = new TextField( ); var formatter:flash.text.TextFormat = new flash.text.TextFormat( ); formatter.color = 0x0000FF; // Make the text blue field.text="12345678900987654321asdfasdf"; field.setTextFormat(formatter,0,10); field.setTextFormat( formatter,10,20); addChild(field); } } }
Related Scripts with Example Source Code in same category :