Hi guys
I’ve attained soo much help from the Kirupa forums that I thought I get involved.
I’ve been trying to do what should be a simple task and have got to the point where I’m cursing and pulling out my hair.
What I’m doing is creating a dynamic text field, applying a TextFormat to the text field to style it and then add text.
It works except when I flick the embedded font Boolean to true all font disappears. If it’s false it runs at the default font.
I have search long and hard on the net and have tried many different version of the code with no success.
Below is a script I wrote just to test embedding as I was hacking up my original code too much and had to separate it.
var text_field = new TextField();
text_field.text = "the quick brown fox jumped over something that had the letter z in it.";
text_field.width = 250;
text_field.x = 40;
text_field.y = 40;
text_field.selectable = false;
text_field.border = false;
text_field.textColor = 0xCCCCCC;
text_field.autoSize = TextFieldAutoSize.LEFT
//text_field.embedFonts=true;
var text_format = this.text_field.getTextFormat( );
text_format.font = 'ariel font';
text_format.size = 30;
text_field.defaultTextFormat = text_format;
addChild(text_field);
I have embedded the arial font within the library and set it linkages.
I am my wits end. Can someone please help