I added a custom class for a custom font in the flash project library.
Now when i try to embed the font and use it from actionscript , the text is not getting visible.
There is no error being thrown.
Here is my code.
var tabfont:Font = new tabHeaderFont();
var format:TextFormat = new TextFormat();
format.font = tabfont.fontName;
tab.defaultTextFormat = format;
tab.embedFonts = true;
addChild(tab);
Can anybody figure out what is wrong with this.
Have you tried the setTextFormat method of TextField to apply the text format instead of the defaultTextFormat property? Also, make sure setting the TextFormat is done after setting any properties in your TextFormat instance or they will not be applied.
You also need to make sure you set the TextFormat after setting the .text property of your TextField or the text will not appear.