Var popUpPt:Point = sprite.localToGlobal(new Point (0,0));         // (0,0) is 
upper left corner in the sprite's coordinate space.  It's x,y does not matter
popup.Move(popUpPt.x, popUpPt.y);


Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Monday, October 05, 2009 12:42 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] localToGlobal???



So my head is spinning?

I have a popup that is popped on the mainstage. I want to that popup to follow 
a sprite that is down in the Display list about 4 levels.

So if you a user drags the sprite say left 150 pixels and down 150 the popup 
needs to follow it.

I am trying to do popup.move (somenum, someothernum ) but it doesn't work out 
correctly. I can't seem to get the coord correct or on the same playing field.

The popup might be instantiated at the center of the stage, which is x240 and 
y240 but the sprite might be at x1500 and y 1600 on its level of the 
displaylist.

TIA, J

Reply via email to