Re: [Flashcoders] Maintain position on rotation

2008-06-19 Thread jonathan howe
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 =

[Flashcoders] Maintain position on rotation

2008-06-18 Thread eric e. dolecki
AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). 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.

Re: [Flashcoders] Maintain position on rotation

2008-06-18 Thread Rob Romanek
Hi Eric, Try out this code, should do the trick and show that localToGlobal does work Run it once as is, then uncomment the rotation and see the results. hth, Rob var sprite1:Sprite = new Sprite(); sprite1.graphics.beginFill(0x00ff00); sprite1.graphics.drawRect(0,0,100,100);

Re: [Flashcoders] Maintain position on rotation

2008-06-18 Thread Rich Shupe
Theoretically, I'm not sure why not. Can you describe how/where they should overlap or post some code? On 6/18/08 1:27 PM, eric e. dolecki wrote: AS3. I have a MC I am rotating, and inside the MC I have a Sprite (affixed to the bottom of the MC). While rotating, I want to place another

Re: [Flashcoders] Maintain position on rotation

2008-06-18 Thread Jon Bradley
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

Re: [Flashcoders] Maintain position on rotation

2008-06-18 Thread eric e. dolecki
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