textField._height = The Devil™

Dear friends/people who would like to prevent the hair on my head from meeting an untimely fate,
I can’t tell you the # of times I’ve had to do this, but I can tell you it’s the same # of times that I’ve given up on trying to solve it…

  • textfield on stage (text_txt), height is whatever the default height is for the font size (let’s say 16 pixels).
  • XML loads, populates the textfield with some crap, and the textfield resizes vertically (let’s say to 100 pixels).
  • i trace out the height of the textfield (text_txt._height) or the height of the text (text_txt.textHeight) but get the default values (16 pixels or whatever). i rage.
  • then i try text_txt.watch(“text”, checkHeight);
  • checkHeight basically traces text_txt._height and text_txt.textHeight;
  • same results, even though this is happening after the textfield’s contents have changed! i rage.

my question: how on earth do i get the height of a textfield after it has been autosized (presumably this is what .watch above should be giving me?)?!? can this be done w/o resorting to some onEnterFrame madness to watch for an increase in height?

please oh please oh please help.

thanks and a good day to you.

  • steve