Simple HTML Text

by bradsedito forked from ff: おみくじ (diff: 30)
♥0 | Line 20 | Modified 2012-10-18 03:17:09 | MIT License
play

ActionScript3 source code

/**
 * Copyright bradsedito ( http://wonderfl.net/user/bradsedito )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/hCTX
 */






package 
{
    import flash.text.engine.TextLine;
    import flash.text.TextField;
    import flash.display.Sprite;
    
    
    public class SimpleHTML extends Sprite {
       public var a:TextField;
       public var myText:String = new String(            
       /**/        "<b> This is a simple way to implement HTML text into AS3. </b>"  +  
       /**/        "<b> This is a simple way to implement HTML text into AS3. </b>"               
       )           
           
       
        public function SimpleHTML() {        
            a = new TextField();
            a.width     =  450;            
            a.height    =  450;             
            a.htmlText  =  myText; 
            //--> Or, you can add string here directly like this: 
            //    "<b> This is a simple way to implement HTML text into AS3. </b>";
            
            stage.addChild(a);
        }    
    
    }//class
}//package