dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

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

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    10

    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. #2
    Senior Member
    Join Date
    May 2001
    Posts
    1,838

    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. #3
    Junior Member
    Join Date
    Aug 2000
    Posts
    10

    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center