Mega Code Archive

 
Categories / Flash ActionScript / TextField
 

Use the TextFormat objects color and underline properties

package {   import flash.display.Sprite;   import flash.text.TextField;   public class Main extends Sprite {     public function Main(  ) {       var field:TextField = new TextField(  );              field.text = "Website";         var formatter:flash.text.TextFormat = new flash.text.TextFormat(  );         formatter.color = 0x0000FF;         formatter.underline = true;         formatter.url = "http://www.rntsoft.com/";         field.setTextFormat(formatter);         addChild(field);     }   } }