7
votes

I have a dynamic textfield which seems normal with the text I set by Flash IDE, but it disappears when I change it's text property, programmatically. Except if I set the textfield to use no anti-aliasing (Bitmap text [no anti-alias]);

I don't know why that's happening, maybe it's because the font I'm using, (it's the Helvetica Neue, Black Condensed) or it is some Flash CS5 Bug.

Have someone here already had this problem?

Ps.: The textfield already have all chars embeded, that's why the text appears initially, and disappears only when I change the text.

[EDIT]

If I change the style of the font from Black Condensed(a kind of bold+italic), to Black(just bold), the problem doesn't happens anymore. But I really need to use that font style...

2

2 Answers

11
votes

Not sure if this is related to your problem, but there is a 'bug' that when you assign a new text to a dynamic TextField sometimes the formatting used with the original text is not applied to the new text.

Maybe the following helps:

// ...
// get format of first char if TextField contains some text
var tf: TextFormat = aTextField.length > 0 ? aTextField.getTextFormat(0, 1) : aTextField.getTextFormat();
// assign new text
aTextField.text = aText;
// apply formatting to new text
aTextField.setTextFormat(tf);
0
votes

Try opening 'Embed..' in the CHARACTER panel and choose 'All' in 'Character ranges'.