I'm trying to apply some simple CSS coding to an html'd dynamic text box, from *inside* Flash 8, with AS, rather than from an external .css doc.

I found the code below online; it is similar to many others I've seen. I think it should work, but doesn't. (I tried adding a period in front of customClass--nuthin'; I also tried taking out the fontFamily altogether, as I'm on a Mac and I've heard bad things.)

I'd like eventually to modify it to allow loading from an html'd external file, which I generally know how to do. I've tried coding that purports to apply ActionScript-based CSS styles in that circumstance, but I couldn't get them to work either.

Frankly, I've tried this on two other forums and no one's replied.

Any ideas? TIA.

/*
var styles = new TextField.StyleSheet();
styles.setStyle("p", {textDecoration:"none", color:"#000000"});
styles.setStyle("customClass", {fontFamily:"_serif",fontWeight:'bold', color:"#FF0000", fontSize:'24px'});
html_fld.html = true;
html_fld.styleSheet = this.styles;
html_fld.htmlText = "<p class='customClass'>Should be red</p><p>Should be black and <span class='customClass'>red again</a></span></p>";
*/