TextAreas and TextInputs playing havoc with the size of the parent (AIR/AS3)

I'll start with an example:

var testTF:TextField = new TextField();
var testTA:TextArea = new TextArea();
var testSpr:Sprite = new Sprite();

testSpr.addChild(testTF);
testSpr.addChild(testTA);

testTA.width = 400;
testTA.x = 200;

trace(testSpr.width);

Now, the track seems like it should spit 600, right? For some reason but it is only to spit the width as if testTF was the only thing in there. It is not just the tracing instructions that are weird either, this makes it difficult to position elements dynamically to the right of the testSpr. Is there something weird about how the TextAreas and TestInputs behave as children of another display object? If it makes a difference, this is part of a project AIR 2.0. Thank you.

apply the validateNow() method to your text box before querying the size:

.

.

.

testTA.validateNow ();

trace (testSpr.Width)

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • Reinstall Mac on imac (I don't have boot camp and os!)

    HelloI have after buying an imac, I erase all the os configuration and know just have windows on imac (I have no os or boot camp) Now, I don't know how I have to re-system operating system.  I want to again on the imac os... but can't... because my s

  • Add an image in labview front

    Hello I need help to add an image to the front of labview and then coloring specific pixels in the image. For example, to add a photo of the road, and then color the pixels of the road in the image with different colors according to another entry. Ca

  • g handset system disable the code 21976913

    I have entered wrong password don't leave me in hit shows 'computer power on password' enter shows system disable 21976913 what I need to do? HP Pavilion G series windows 7

  • Printer stopped working. Pop - up says that a printer connector has stopped.

    Printer stopped printing. When printing has tried, it displays popup indicating that "the printer connection has stopped."

  • GridFieldManager encapsulates no text at the end of the screen

    Hi all I've implemented a GridFieldManager in my BlackBerry (OS 5.0) application.  My GridFieldManager contains 5 rows and 2 columns.  The first column contains an image of the ball, and the second column contains text.  For some reason, the text is