On Jun 18, 2008, at 1:27 PM, eric e. dolecki wrote:

While rotating, I want to place another MC's x,y (each frame) on that
rotating MC. However the x,y never updates. I tried localToGlobal, but that doesn't seem to change either during the rotation. Can this be easily done?


Give something like this a shot. Note that this is completely untested because I wrote it right here ... this is the general idea though.

var m:Matrix = mainMC.transform.matrix;
var pt:Point = new Point( mainMC.theChild.x, mainMC.theChild.y);

var position:Point = m.transformPoint(pt);

// You might need to add in the tx,ty offsets
var matchMoveClipX:Number = position.x + m.tx;
var matchMoveClipY:Number = position.y + m.ty;

That assumes, of course, that you're applying your transformations using matrices.

If you use dot notation on the properties (rotate, scale, x y), I'm not 100% certain that those properties are updated in the transformation matrix of the object.

good luck.

jon
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to