Forum Moderators: open

Message Too Old, No Replies

Calculate size of externally loaded text

         

Greven

6:29 am on Dec 18, 2006 (gmt 0)

10+ Year Member



I'm experienced with lots of script/code, but not so much with the actionscript.

I'm loading information dynamically into a dynamic text field. The amount of text loaded will change, and will often be too large to fit in the text field. Is there anyway to calculate the size that the text will take up so I can resize the dynamic text field to allow for the amount of text?

Thanks in advance.

vsgill

7:47 am on Dec 21, 2006 (gmt 0)

10+ Year Member



try using

autoSize property for the textfield

my_txtfield.autoSize = "left";

also make sure the textfield is multiline and scrollable
your can rite click on the textfield and select scrollable.

this will expand the text box as requred.
cheers
Vik