0
votes

I am working with Actionscript 3 in Flash, and I have a dynamic text field, instance called "textField" inside an instance of movie clip "mcpoo" and a keyframe with actionscript:

addEventListener(Event.ENTER_FRAME, myfunc);

function myfunc(e:Event):void{
  mcpoo.textField.text = "this is a test string";
}

When I set the text field to a default value via text tool, e.g., "asdf" and test the movie, the text will change to include ONLY the chars in the default value, stripping out the rest. "this is a test string" is displayed as "ssass".

Why the good gawddam would it do something like this? As a corollary, how can I work around this or avoid it?

1

1 Answers

1
votes

You need to embed more characters in the font you are using. By default, Flash will only embed the characters that you put in the field at author time. It does this to reduce file size.

Select the textfield and hit the Embed button in the Properties panel.
From there you can select the range of characters you want to include (under Character Ranges). You probably want to limit it to only the characters you will need, as it will add to the file size of the SWF.

Alternately, you could use a system font and forget about embedding anything.