Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: [flasher] Re: X and Y coordinates - Confusion! |
From: | Muzak |
Date: | Mon, 26 Feb 2001 12:39:49 -0000 |
If you select an object on the stage. The x and y coordinates shown will be the top left corner of the object. If you then select
the little white square in the middle of the 9 boxes, it will turn black and the x and y coordinates of the object shown in the info
panel are now the center point of the object (in refence to it's parent) instead of the top left corner.
When using the get property for the x and y position of an object, the returned values are those of the objects center point, not
it's top left corner --> unless of course you have moved the center point of the object to the top left corner of the object (or the
other way around - hope that's clear - don't know how else to explain this).
If you have a MC in another MC, the position of the movieclip will be in reference of it's parent movieclip and not the main
timeline. You can use globalToLocal() to 'convert' it's x and y coordinates in reference to the _root and localToGlobal() does the
opposite.
Look up MovieClip.loacalToGlobal() and MovieClip.globalToLocal() in the Actionscript dictionary for more on that.
Just play around with it for a while and you'll get the hang of it :-)
hth,
Muzak
----- Original Message -----
From: "Mike Kelly" <mike [dot] kellyt-online [dot] de>
To: "flasher from chinwag" <flasherlists [dot] chinwag [dot] com>
Sent: Monday, February 26, 2001 1:12 PM
Subject: [flasher] Re: X and Y coordinates - Confusion!
> Duh, Monday morning... I'll try again.
>
> Hi,
> I'm working a lot with nested movie clips, and I'm getting confused in my
> attempts to reference their positions. Can anyone explain:
>
> 1. What the "box of boxes" with the white square and black square options
> (next to X and Y on the INFO panel) exactly refers to; and
> 2. Any tips for trying to maintain one set of x,y cordinates throughout a
> project, instead of having to translate between multiple ones.
>
> Any general clarification or tips would be useful.
> Thanks,
> M
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]