Flash CS5 - text disappears when I change the property of the text, unless I set an alias

I have a dynamic text field that seems normal with the text set by the Flash IDE, but it disappears when I change its text property programmatically. Except that I set the text box to use without anti-aliasing (the text of the bitmap [no anti-aliasing]);

I don’t know why this is happening, maybe because the font I use (this is Helvetica Neue, Black Condensed), or it is a Flash CS5 error.

Has anyone here already had this problem?

Ps: The text field already contains all the characters, so the text appears initially and disappears only when the text changes.

[EDIT]

If I change the font style from Black Condensed (kind of bold + italics) to Black (just bold), the problem no longer arises. But I really need to use this font style ...

+7
source share
2 answers

I'm not sure if this is related to your problem, but there is a β€œmistake” that when assigning new text to dynamic TextField, sometimes the formatting used with the source text does not apply to the new text.

Perhaps the following will help:

// ... // 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); 
+10
source

Try opening "Insert .." in the CHARACTER panel and select "All" in the "Character Range".

0
source

All Articles