views:

31

answers:

2

I am drawing a circle on the stage using graphics.drawCircle that rotates around another circle, and I want to have a textfield that sits inside the moving circle and rotates around with it. Is this possible?

A: 

You can make each of your circles draw inside its own Sprite, and just move that sprite around. Then you can use Sprite.addChild to add your TextField as a child.

TandemAdam
A: 

So you have a rotating circle, with a text. So a rotating circle and text. So a pair of things rotating. So make it one thing! (Like the previous user said).

You got this:

var the_circle_rotating:MovieClip = ...;
var the_text:TextField = ...;

then you do this:

var the_group:Sprite = new Sprite();

the_group.addChild(the_circle_rotating);
the_group.addChild(the_text);

and now instead rotating the circle, you rotate the sprite...

joxnas
The one thing to watch out for is that text has to be embedded before it can be rotated. I'm not sure how it behaves when it's inside the sprite doing the rotating and not rotating itself, but in case you do get this working only to see it disappear at certain angles, that's what's going on!
DHuntrods