The url property allows you to add a hyperlink to text. : Text : TextField Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » TextField » Text »

 

The url property allows you to add a hyperlink to text.


 


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 = "Visit the Web site";

        var tfFormatter:TextFormat = new TextFormat();
        tfFormatter.url = "http://thefactoryfactoryfactory.com/wordpress";
        tfFormatter.target = "_blank";
        tfFormatter.underline = true;
        tContent.setTextFormat(tfFormatter,2,5);
        addChild(tContent);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo TextField
» Text