Question
Dynamic text and embedded font
Hi,
I'm new to Flash and AS3, and I'm having a problem when I do the following: I create an empty dynamic text field in the authoring environment, click "Embed...", and choose the character sets that I want (I get the same results when I embed the entire font). The first time I change the contents of the text field with the command:
text_field.text = "string 1";
I get good results--the text appears in the correct font. However, subsequent attempts to update the .text property fail with no error message, and the field becomes blank.
If I remove the embedded font by clicking "Don't embed" in the embedding dialog, then every time I update the field's .text property, it displays correctly using a local machine font.
I've also tried embedding the font in the swf by creating a dynamic text field in the authoring environment, into which I place no text, creating a second, functional text field in actionscript, formatting it, using the "embed = true" property, and repeatedly updating the .text property with the same bad results as described above.
I haven't tried using the [embed] metatag to dynamically load the font.
I've tested the swf in IE7 and Firefox on two machines with the same results. What am I doing wrong?
Thanks,
Dave
I'm new to Flash and AS3, and I'm having a problem when I do the following: I create an empty dynamic text field in the authoring environment, click "Embed...", and choose the character sets that I want (I get the same results when I embed the entire font). The first time I change the contents of the text field with the command:
text_field.text = "string 1";
I get good results--the text appears in the correct font. However, subsequent attempts to update the .text property fail with no error message, and the field becomes blank.
If I remove the embedded font by clicking "Don't embed" in the embedding dialog, then every time I update the field's .text property, it displays correctly using a local machine font.
I've also tried embedding the font in the swf by creating a dynamic text field in the authoring environment, into which I place no text, creating a second, functional text field in actionscript, formatting it, using the "embed = true" property, and repeatedly updating the .text property with the same bad results as described above.
I haven't tried using the [embed] metatag to dynamically load the font.
I've tested the swf in IE7 and Firefox on two machines with the same results. What am I doing wrong?
Thanks,
Dave
