A Flash Developer Resource Site

# Thread: plotting positions of MC's within MC's

1. ## plotting positions of MC's within MC's

Hello whoever...

Right, I have a movieClip that rotates around its own axis (this is done by code not tweening). Inside that movieClip I have another movieClip (containing just a circle) placed away from the 1st clips centre. Result - circle spinning around. Simple.

Now... how do I get the _x and _y values of that spinning circle???? All I can get is static numbers of either the _x and _y position on the movieClip on the _root, or the _x and _y values of the distance between the two movieClips centre points (ie the radius of the circle).

Any help would be really appreciated,

Cheers, Si.
[Edited by smilerroberts on 06-13-2001 at 11:41 AM]

2. ## Re: plotting positions of MC's within MC's

If you do MC.circle._x+=10; That will increase the radius, rather than moving horizontally. If this is done in a loop, the effect is spiral out. The _x of circle is the value from _parent coordinate space, not the _root.

You want to know the position of circle by _root zero point and vertical coordiate, you can use:

point=new Object();
point.x=MC.circle._x;
point.y=MC.circle._y;

MC.localToGlobal(point);
trace(point.x+","+point.y);

3. ## Re: Re: plotting positions of MC's within MC's

Excellent - cheers mate.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

 » Home » Movies » Tutorials » Submissions » Board » Links » Reviews » Feedback » Gallery » Fonts » The Lounge » Sound Loops » Sound FX » About FK » Sitemap