I have a programmatically-generated text field that looks like this:
var tf:TextField=new TextField();
tf.styleSheet=styles;
tf.embedFonts=true;
tf.antiAliasType="advanced";
tf.selectable=false;
tf.width=760;
tf.multiline=true;
tf.wordWrap=true;
tf.autoSize="left";
tf.htmlText="<p>"+xmldoc.meta.welcomeText+"</p>";
tf.x=tf.y=20;
FYI, here’s what the styleSheet is based on:
css="p{font-family:"+(new HNC().fontName)+";font-size:16px;color:#333333} a{display:inline;color:#0000FF}";
styles=new StyleSheet();
styles.parseCSS(css);
(“HNC” is the identifier of a font included in the library.)
Everything appears to render properly – except (of course!) the anchor tags. Without a:hover, there’s just a weird extra space before the first instance of an anchor tag – once you mouse over it, it goes away. If I add back the a:hover style, anytime I mouse over either link, in one place, that space appears (and in another, adds a space at the end of the link!), and when I mouse off, it goes back to looking “normal.”
Has anyone else noticed this odd behavior? It’s too distracting and unprofessional-looking to leave the way it is, but I’m not sure what my alternatives are if I want to include links in the text (which is imported from an XML file).
I’d appreciate any advice! Also, this is in Flash CS3. Thanks!
EDIT: If I don’t embed the fonts, the “problem” goes away; however, I’m left with non-embedded fonts. Rarggh.