Posted By

RubenBristian on 01/23/11


Tagged

as3


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

kure69


Default stylesheet for text field


 / Published in: ActionScript 3
 

  1. //create title default sheet
  2. var defStyle:StyleSheet=new StyleSheet();
  3. var styleObj:Object=new Object();
  4. styleObj.color="#"+"FF0000";
  5. defStyle.setStyle("p",styleObj);
  6.  
  7. //add sheet to text
  8. txtField.styleSheet=defStyle;
  9.  
  10. //add the text
  11. txtField.htmlText="text here";

Report this snippet  

You need to login to post a comment.