Default stylesheet for text field


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.