package{
import flash.display.Sprite;
import flash.text.*;
public class Main extends Sprite{
public function Main(){
var specialnoteDeclarationBlock:Object = new Object( );
specialnoteDeclarationBlock.fontFamily = "Arial"
specialnoteDeclarationBlock.fontSize = "20";
specialnoteDeclarationBlock.fontWeight = "bold";
var styleSheet:StyleSheet = new StyleSheet( );
styleSheet.setStyle(".specialnote", specialnoteDeclarationBlock);
var t:TextField = new TextField( );
t.width = 300;
t.wordWrap = true;
t.multiline = true;
t.styleSheet = styleSheet;
t.htmlText = "Always remember...
"
+ "Set styleSheet before htmlText!
"
+ "Otherwise, the stylesheet will not be applied.
";
}
}
}