Hello all,
I am having a problem using embedFonts. It just won’t work. At first I thought it was something in my code, but it seems to be working fine except for the embed. So I went through the help doc on it and even using the example code it won’t work. I am guessing it must be how I am setting up the font in the library. So here is what I am doing.
In the library, I select New Font… I name the font Pakt an choose the font I am using which is Pakt-Black. Then I use this code:
ActionScript Code:
[FONT=Courier New][LEFT][COLOR=#000000]**var**[/COLOR] my_fmt:[COLOR=#0000FF]TextFormat[/COLOR] = [COLOR=#000000]**new**[/COLOR] [COLOR=#0000FF]TextFormat[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
my_fmt.[COLOR=#0000FF]font[/COLOR] = [COLOR=#FF0000]“Pakt”[/COLOR];
[COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]createTextField[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]“my_txt”[/COLOR], [COLOR=#0000FF]this[/COLOR].[COLOR=#0000FF]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]10[/COLOR], [COLOR=#000080]160[/COLOR], [COLOR=#000080]120[/COLOR][COLOR=#000000])[/COLOR];
my_txt.[COLOR=#0000FF]wordWrap[/COLOR] = [COLOR=#000000]true[/COLOR];
my_txt.[COLOR=#0000FF]embedFonts[/COLOR] = [COLOR=#000000]true[/COLOR];
my_txt.[COLOR=#0000FF]text[/COLOR] = [COLOR=#FF0000]“Hello world”[/COLOR];
my_txt.[COLOR=#0000FF]setTextFormat[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]
[/FONT]
Nothing. So I comment out the embedFonts and the setTextFormat and everything works. So what am I doing wrong here? Thanks!