The code you posted is AS 2 syntax. You have to convert it to AS 1 in order to use it.
Here's an AS 1 example that uses the stylesheet class.
Create a dynamic textfield with 'has html' set to yes.WilbertCode:var css_str = '.heading {font-size: 24px; font-weight: bold; }'; var my_styleSheet = new TextField.StyleSheet(); my_styleSheet.parseCSS(css_str); txt1.styleSheet = my_styleSheet; txt1.htmlText = "<p class='heading'>My formatted text</p>";




Reply With Quote