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

2

7

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

Chole answered 28/10, 2011 at 22:51 Comment(0)
S
11

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);
Smalley answered 29/10, 2011 at 11:29 Comment(5)
This fixed my problem. Kind of surprised Adobe didn't clean this up yet.Tanana
FYI, this bug is still prevalent. Just had to apply your work-around in Flash CS6.... Crazy. Thank you @Josha!Permian
Thanks, I had the same problem. First time I've seen it happen, too. Odd.Helbonna
Thank you, i have been completely stuck for the last hour try to figure out why the heck my text disappeared when i changed it. This helped me solve my problem.Chelseachelsey
Spent many hours trying to understand why my text wouldn't appear, this was the answer I desperately needed.:DImplicate
J
0

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

June answered 28/10, 2011 at 23:10 Comment(3)
Yes, is already done, that's not my problem here. If weren't this way, the text wouldn't appear before I changing the text value.Chole
@MarceloAssis — It would, because flash auto embeds glyphs for text that is written in the IDE. Maybe you used some other font for that TextField (e.g. Helvetica Black), embedded it's glyphs and then changed the font to Helvetica Black Condensed. I'm sorry if this is not the case, but I can't seem to replicate the problem.Afterimage
I think I seemed rude, I'm sorry for that. But embeding fonts it's not the case. Before coming here I tried embed almost all related font styles. But, thanks anyway!Chole

© 2022 - 2024 — McMap. All rights reserved.