P
P
pxsh2014-02-16 21:03:57
ActionScript
pxsh, 2014-02-16 21:03:57

How to bind text to object coordinates in actionscript 3?

How to bind text to object coordinates. I bind either directly to ball.x or to a variable equal to this coordinate, the text shows only the initial coordinate, even if it is done through a timer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander N++, 2014-04-12
@sanchezzzhak

Add a TextField directly to the ball to expose the TextField to the desired coordinates from the container.

var text:TextField = new TextField;
ball.addChild(text);

If the Ball changes its position then the text will follow the ball as it is anchored to the container's local coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question