prog.hu: XML-ben+felkover 1.

by szbzs2004
http://prog.hu/tudastar/133310/XML-ben+felkover.html
♥0 | Line 17 | Modified 2011-04-19 00:29:51 | MIT License
play

ActionScript3 source code

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

// http://prog.hu/tudastar/133310/XML-ben+felkover.html
package {
    
    import flash.display.Sprite;    
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
        
    public class HtmlTextTest extends Sprite {
        
        private var tf:TextField;
        
        public function HtmlTextTest() {
            var myXML:XML = <xmlem>normal<b>bold</b><i>italic</i><u>underline</u></xmlem>;
            tf = new TextField();
            tf.autoSize = TextFieldAutoSize.LEFT;
            tf.defaultTextFormat = new TextFormat("Arial", 16);
            tf.htmlText = myXML.toString();
            addChild(tf);
        }
    }
}

Forked