Set both text and htmlText : htmlText « TextField « Flash / Flex / ActionScript






Set both text and htmlText

 

package{
  import flash.display.Sprite;
    import flash.text.*;
  public class Main extends Sprite{
    public function Main(){
        var t:TextField = new TextField(  );
        t.htmlText = "<B>hello</B>";
        t.text += " world";
        addChild(t);
    }
  }
}

        








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.Use HTML hyperlink in TextField
7.Condensing Whitespace
8.Formatting Text by using HTML tags
9.Adding a Hyperlink to Text
10.Add a Hyperlink to Text with target
11.Set link color
12.Specify a target window into which the link opens
13.Formatting Text with HTML
14.Use HTML to make the text bold
15.Quoting attribute values
16.Interactions between the text and htmlText variables
17.Adding Mail Links
18.Calling JavaScript Functions
19.Embedding Content in Text
20.Use img tag in TextField
21.Embed a SWF file