• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 31. Stylesheets > Some Extra Stuff

Some Extra Stuff

parse() and parseCSS()

A third way is to create a string of CSS in Flash, then parse that string using parseCSS() or parse(). Here is an example:

var myStyle = new TextField.StyleSheet();
var copy:String = ".copy {color: #0000FF}";
myStyle.parseCSS(copy);
articles_txt.styleSheet = myStyle;

articles_txt.html = true;
articles_txt.htmlText = '<p class="copy">Click me now!!</p> Hithere!';


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint