Textformat for input boxes

July 31st, 2007

I was having the following issue and I spent a lot of time figuring it out.

I had an Input Text and applied some formatting to it, using target.setTextFormat(format). But the format would only work if the textfield had some text in it.

I tried to “hack” around it and leave some text in it, then apply the textformat then remove the text. But when doing: target.text = “”; The formatting was also removed.

I’ve noticed that for “new text” that the user might input, you need to use: target.setNewTextFormat(format)

That worked like a charm, and all my input texts look like they’re supposed to.
I hope someone finds this useful.

Entry Filed under: Annoyances, Flash

Bookmark and Share   Del.icio.us   Technorati

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Most Recent Posts