Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash CS5 - Text disappear when I change the text property, except when I set no alias

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...

like image 597
Marcelo Assis Avatar asked Oct 28 '11 22:10

Marcelo Assis


1 Answers

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);
like image 177
Josha Avatar answered Oct 28 '22 08:10

Josha