Ever had this happen? You have an existing text field, and you want to see its textFormat properties. So you do…
var fmt:TextFormat = myTextField.getTextFormat();
Unfortunately, all of the properties (fmt.font, fmt.size, etc.) of fmt are null!
This bug was driving me crazy. What I discovered was that getTextFormat() is basically retarded under two conditions:
1. Your text field is empty and has never had text in it.
2. Your text field is empty, had text in it at some point, and is set to use Single Line.
Under condition #1, you will never be able to pull any TextFormat data out of your text field, even though it technically should be there. In condition #2, you MUST set the text field to multi-line or it will not work.
What is the solution? Put an empty space in your text field before you use it. This seems really dirty but unless you want to dynamically generate all of your fields, this is the gift Adobe has given us :)