Why can't I get textWidth from my Text component?

Posted by Adam on Stack Overflow See other posts from Stack Overflow or by Adam
Published on 2010-03-26T01:37:36Z Indexed on 2010/03/26 1:43 UTC
Read the original article Hit count: 293

Filed under:
|
var txtIt:Text = new Text();
                txtIt.text = full_array[t][0];
                txtIt.width = 700;
                txtIt.buttonMode = true;
                txtIt.mouseChildren = false;
                txtIt.selectable = false;
                txtIt.y = t * 30;

                trace(txtIt.textWidth);

                myCanvas.addChild(txtIt);

Why can't i get the textWidth for the component? I can get it for textFields.

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript