Eric, In your comment you mentioned localToGlobal wasn't updating. Just in case: one misttep that I made when first working with AS3 was that localToGlobal no longer modifies the point you pass it. You have to evaluate the return value i.e.
changedPoint = someDisplayObject.localToGlobal(originalPoint); changedPoint not originalPoint. -jonathan On Wed, Jun 18, 2008 at 8:34 PM, eric e. dolecki <[EMAIL PROTECTED]> wrote: > Hey guys, > > Before I saw these response posts, I took a slightly different angle on > things. When I create my limbs, I am actually adding another limb to a > joint > sprite on the end of the main limb. That way it simply moves with the upper > limb, and can still rotate freely on its own, using some rotational rules. > It avoids a bunch of math and allows the nesting to simply take care of > some > of it. > > When I tried points and localToGlobal, it still gave me weird results, > making me take the route above. > > Thanks for the responses, it's why this list is the best in the world. > > - e. > > On Wed, Jun 18, 2008 at 2:16 PM, Jon Bradley <[EMAIL PROTECTED]> > wrote: > > > > > 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 > > [email protected] > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > -- -jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101 _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

