I'm dying here trying to figure this out for days.
Here's the scenario:
1) External script.as file dynamically imported to loader.swf
file that creates a textfield (createTextField)
2) Content for the text field should be provided by an XML
3) Content styled by external css file
4) Fonts need to be embedded so as to apply anti-alias
I can get the XML & CSS to apply to the text field, but
can't get the content to use the embedded font. It usually comes
back "undefined" if the embedded font works. Otherwise, when I
comment out the embed font, the content work, but of course, not
the anti-aliasing. Ugh. I've tried doing all kinds of forum
searches, but nothing has clarified this for me. I'm intermediate
at AS and this is something new to me. Any help will be GREATLY
appreciated and I will send good juju your way.
Here's a sampling of some of the script I have been using:
mf = new TextFormat();
mf.font = "arial_font";
Stage.scaleMode = "noScale";
So, if I turn off the xml/css and use htmlText to create
content for the text field, the text uses the embedded font and is
anti-aliased. If I keep the xml/css but comment out embedFonts,
then the content works but is not anti-aliased. I need both of
these to work at the same time. PLEASE HELP!!
Thanks! It's the little things that get you in something like
this. I had embedded/linked the font in the library, but it was
Arial not Franklin... duh... I also noticed that the css has to be
specific and only call the font embedded (ie, no sans-serif, bold,
etc) or it won't work.
Thanks again David!