|  | embed font |  | |
| | | GregConnTelevirtual |  |
| Posted: Mon Jul 07, 2008 5:00 pm Post subject: embed font |  |
Hi,
I'm having real trouble with using a font that i've embedded into the library. I'm having this problem with as2 and also as3 but right now i need help on the as2 problem.
I've embedded the franklin gothic font and it's id is Frank_gothic and class is FrankGoth.
the code is attached
where myTextBox exists on the scene......any help would be great, it seems that the textFormat is just completely being ignored.
thanks
Greg
var tf:TextFormat = new TextFormat(); tf.font = Frank_gothic;
tf.color = 0x00FFFF; myTextBox.text = "test"; myTextBox.embedFonts = true; myTextBox.setTextFormat(tf); |
| |
| | | Rob Dillon |  |
| Posted: Mon Jul 07, 2008 5:42 pm Post subject: Re: embed font |  |
The font name is a string, so use:
tf.font = "Frank_gothic"; |
| |
| | | GregConnTelevirtual |  |
| Posted: Tue Jul 08, 2008 8:51 am Post subject: Re: embed font |  |
Thanks for the response but this still isn't working....?
Greg |
| |
| | | rlc5611 |  |
| Posted: Tue Jul 08, 2008 9:43 am Post subject: Re: embed font |  |
| Can you try setNewTextFormat instead of setTextFormat? I can't see enough of your script to see whether that will make a difference. |
| |
| | | GregConnTelevirtual |  |
| Posted: Tue Jul 08, 2008 9:49 am Post subject: Re: embed font |  |
Hi ric,
That is my script, it wasn't working on my main project so i've just made a really simple app that has one textbox that i fill with text and assign a format to it...
I tried your setNewTextFormat idea but that didnt work either.
...any other ideas??
Greg |
| |
|
|