0plus1
0plus1

Reputation: 4555

Is it possible to change the point which as3 considers when setting the x,y position of a textField?

I have one textfield and I set it's position to for example x=5, y=5. So I have it like this:

1-2-3-4-5-6-7-8-9-x
2       
3
4
5       
6       TEXT
7
8
9
x

Is it possible to set the textField in a way that the x y value are applied to the bottom corner of the textField like this

1-2-3-4-5-6-7-8-9-x
2       
3
4    TEXT
5  
6
7
8
9
x

Hope I explained myself correctly.

Thank you in advance .

David

Upvotes: 0

Views: 291

Answers (2)

Joel Hooks
Joel Hooks

Reputation: 6565

You'd need to extend TextField and override updateDisplayList() with the appropriate logic to calculate this for you. There is no way to explicitly set the origin on a display object.

Upvotes: 1

David
David

Reputation: 3217

Other than just setting textfield.y = y - height, I don't think so.

Upvotes: 0

Related Questions