PDA

View Full Version : Resizing the Text Area component


frank grimes
02-08-2005, 05:57 PM
Hello,

I am trying to resize a Text Area component dynamically and have found that when you alter the height of the component dynamically the text and component itself look very stretched and ugly.

As an example open a new flash mx 2004 pro movie, grab a text area component and place it on the stage with an ID of "test_ta" give it a width and height of 100, then and make sure to populate the text of the "test_ta" component with some random/bogus words. Now place this code in an actions frame:

test_ta._height = 300;

and then run your movie to see the effect.

Is there a way to change the height, width, etc of the text area component dynamically without causing this strange/ugly/non-useable effect?

thanks,

frank grimes

frank grimes
02-08-2005, 06:30 PM
componentInstance.setSize(width, height)

does the trick :)