Log in

View Full Version : Use for TextFieldAutoSize



evan
07-18-2008, 04:40 PM
The TextFieldAutoSize class is an enumeration of constant values used in setting the autoSize property of the TextField class.
What?

Initailly I thought it would create a textbox that allows the user to resize the textbox -it apparently doesn't.

I figure out how to scale one but it enlarges the type too.

so that's the second part of the question.

Medyman
07-18-2008, 07:10 PM
LOL.

The TextFieldAutoSize class allows for textfields to be resized dynamically. So, if you're sending dynamic data into a text field, you don't have to know the size of it before hand.

As far as resizing it, it's just a lot of math. And you really cant only resize the container, you just have to do it in a way that the aspect ratio remains the same. So, it's not a simple task.

You should look at Jack Doyle's Transform Manager (http://blog.greensock.com/transformmanageras2/). The current version is in AS2 but he plans to release an AS3 version sometime this month. Also, check out his tweening classes, if you're interested.

evan
07-18-2008, 07:34 PM
That is exactly what I am trying to figure out. adding to that, I want to do something like that while addding and subtracting items to that array.

Looks like I have my work cut out.