Here’s my dilemma: I have a few fonts embedded in my FLA; these fonts are linked and exported on frame 1. Within a pile of generated symbols, I have a textfield that uses (among other things, this:
var cssString:String="p {font-family:"+(new HNC().fontName)+"; font-size: 24px; color:#1A1A1A} b {font-family:"+(new HNMC().fontName)+"; font-size:48px; color:#FF0000}";
tabStyle=new StyleSheet();
tabStyle.parseCSS(cssString);
...
tabInstr=new TextField();
tabInstr.styleSheet=tabStyle;
tabInstr.embedFonts=true;
tabInstr.selectable=false;
tabInstr.multiline=true;
tabInstr.wordWrap=true;
tabInstr.htmlText=String(tabXML.instr);
tabInstr.antiAliasType=AntiAliasType.ADVANCED;
tabInstr.autoSize=TextFieldAutoSize.LEFT;
It displays all of the relevant text:
<p><b>Point of origin</b><br />Touch one of the available points of origin or touch "Other" to enter your own.</p>
but it only applies the <p> style: the bold text is painted with the same attributes as everything else. I tried ditching the <p> style altogether, but that just made the text fail to show up at all…What am I doing wrong?! Gah!!!
Edit: the thread title was from before I realized that stylesheets and textformats are sworn blood-enemies who hate each other a lot.