Skip to main content
Participant
Sep 25, 2009 5:58 AM UTC
Question

How to target to TextField in text layout Framework?

how can i find text field X position,Y position,width and height? and All the text field properties?

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Participating Frequently
Sep 25, 2009 6:05 PM UTC

See the example below, hope this is what you're looking for.

var

tf:TextField = new TextField();

tf.text = "AAAA";

var x:Number = tf.x;

var y:Number = tf.y;

var h:Number = tf.height;

var w:Number = tf.width;

Translate
Known Participant
Oct 14, 2009 10:31 PM UTC

If your actually looking for the textfield object itself, I don't believe you are going to be able to find it.  I have been doing some investigation into this as I'm working on custom context menu's and the root of the issue comes down to the fact that a textflow is not a display object and not part of the display object tree, thus you won't find something akin to the old textfield displayobject, however, the individual textlines themselves are display objects, so you might be able to either look into those directly, or just work against the container object of the text lines, that should work as well.   Hope this helps!

~ JT

Translate