import flash.text.TextField;
import flash.text.StyleSheet;
var txt:TextField = new TextField();
addChild(txt);
var style:StyleSheet = new StyleSheet();
style.setStyle(".username", {color: "#FF0000",fontWeight:"bold"});
txt.styleSheet = style;
txt.htmlText = "<span class='username'>user</span>aaaaa";
addChild(txt);
var style2:StyleSheet = new StyleSheet();
var heading:Object = new Object();
heading.fontWeight = "bold";
heading.color = "#FF0000";
var body:Object = new Object();
body.fontStyle = "italic";
style2.setStyle(".heading", heading);
style2.setStyle("body", body);
var label:TextField = new TextField();
label.x = 100;
label.styleSheet = style2;
label.htmlText = "<body><span class='heading'>Hello </span>World...</body>";
addChild(label);