  | |  | localToGlobal confusion | localToGlobal confusion
2004-02-19 - By Mendelsohn, Michael
Back Hi list...
I have a MC with a registration point located at _x:360, _y:210 (the
center of the MC). In this MC is a child MC whose registration point is
also centered and is located at _x:-191, _y:85. When looking at this
child MC with respect to the stage, it 's at about location _x:150,
_y:300. I can 't seem to figure out how to use localToGlobal to get the
child 's location with respect to the stage. It seems to be giving me
the wrong location. What am I missing?
Thanks,
Michael M.
theLoc = new Object();
theLoc.x = childObj._x;
theLoc.y = childObj._y;
childObj.localToGlobal(theLoc);
trace(theLoc.x); // traces -23
In the info panel, the point of reference is the center, not the upper
left.
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104741
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |