Use HTML hyperlink in TextField : htmlText « TextField « Flash / Flex / ActionScript

Home
Flash / Flex / ActionScript
1.Animation
2.Array
3.Class
4.Data Type
5.Development
6.Function
7.Graphics
8.Language
9.Network
10.Regular Expressions
11.Statement
12.String
13.TextField
14.XML
Flash / Flex / ActionScript » TextField » htmlText 
Use HTML hyperlink in TextField
 

package{
  import flash.display.Sprite;
  import flash.text.*;
  public class Main extends Sprite{
    public function Main(){
        var tContent:TextField = new TextField();

        tContent.htmlText = "<a href='http://www.java2s.com' target='_blank'>www.java2s.com</a>";
        addChild(tContent);
    }
  }
}

        
Related examples in the same category
1.Displaying HTML-Formatted Text
2.Use html text in TextField
3.Escape HTML tags bracket
4.Add HTML new line tag in TextField
5.Make the text font italic
6.Condensing Whitespace
7.Formatting Text by using HTML tags
8.Adding a Hyperlink to Text
9.Add a Hyperlink to Text with target
10.Set link color
11.Specify a target window into which the link opens
12.Formatting Text with HTML
13.Use HTML to make the text bold
14.Quoting attribute values
15.Interactions between the text and htmlText variables
16.Set both text and htmlText
17.Adding Mail Links
18.Calling JavaScript Functions
19.Embedding Content in Text
20.Use img tag in TextField
21.Embed a SWF file
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.