htmlText & embedded fonts
- Started
- Last post
- 1 Response
- force
ok, I´ve been struggling with this for a couple of hours now, and I´m about to lose my mind.
I am loading text from a txt-file. That works.
I want the html-tags in the txt-file to work in my textfield. That works when the font is not embedded.
I want the font to be aliased=embedded. That doesnt work together with .html = true.I´ve tried a number of different alternatives, shared fonts,textFormat and so on...nothing has worked for me.
There has got to be a way to show htmlText in a textfield with embedded fonts, right ?!
(btw, the textfield is in an external swf that is being loaded into an empty movieclip, if that has something to do with things)
this is my code(a bit simplified here):
[as]
infoField.embedFonts = true;
infoField.html = true;var myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
infoField.htmlText = this.infoText;
}
myLoadVars.load("textFile.txt");
[/as]it seems that flash doesnt want me to be able to have embedFonts and html set to true at the same time. :)
You gotta be able to do it, right ?
Help me out with this one!
cheers / force
- speedlab0
there a couple more steps involved when embedding fonts dynamically.
in your library select "add font" select the appropriate font then give it a linkage ID.
create a textformat object, the font property should be your linkage ID.
finally, once you've assigned whatever textfield properties you wanted, then add textfield.setTextFormat(myTextFo...
hope that helps.