Hi,
Been looking at this for awhile and cant figure out why I can have multiple css styles when I use an external css file but when I try and create styles in AS I cant seem to get two different stlyes in the same box?
heres my test code…
this.createTextField("textBox", this.getNextHighestDepth(), 10, 10, 300, 100);
textBox.border = true;
textBox.html = true;
textBox.multiline = true;
textBox.wordWrap = true;
//
var style_1 = new TextField.StyleSheet();
style_1.setStyle(".style_1", {fontFamily:'Verdana, Arial, Helvetica, sans-serif', fontSize:'18px', color:'#000000', fontWeight:'bold'});
var style_2 = new TextField.StyleSheet();
style_2.setStyle(".style_2", {fontFamily:'Verdana, Arial, Helvetica, sans-serif', fontSize:'12px', color:'#FF0000', fontWeight:'normal'});
//
textBox.styleSheet = style_1, style_2;
textBox.htmlText = "<p class='style_1'>Text style one - <p class='style_2'>Text style two";
Im sure its something to do with the 2nd last line where I define which styles foe each textbox…any help would be kool.
cheers