AS2/FL3.1: Dynamically sized Dynamic and Input text fields

So, I’m making a text editor for my mobile (Nokia 5800). Anyway, I want it to have kinetic scrolling, but since I will be allowing the user to input their own text and also to load their own text files, how could I re-size both a dynamic text field and an input text field so that all of the text is shown, but there isn’t alot of empty space (no one wants to kinetically scroll to the bottom just to realize it is 3000 lines of emptiness :P).

I was thinking possibly finding the total number of characters in the string and deciding on a number of characters per line, then finding line height and making the text box be number of lines time line height. On problem with that is I’m not using a fixed with font (Quicksand Bold), so it would probably not work the best.

Thanks for reading,