CSS Stylesheets for htmlText fields in Flash AS3

You can make your htmltext fields have highlights etc by applying some minor CSS styles to the htmltext fields in Flash.

var theCSS:StyleSheet = new StyleSheet();

theCSS.setStyle("a:link", {color:'#361B59', textDecoration:'underline'});
theCSS.setStyle("a:hover", {color:'#532C8F', textDecoration:'none'});

contentField.styleSheet = theCSS;

More things you can do:
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/text/StyleSheet.html

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑