Hi Gordon -

Not only does that make sense, but it has the aded benefit of working. Thank 
you!

ethan

>
> If you're trying to get the global coords of the upper-left corner of
> event.currentTarget, you would do
> 
>  
> 
>     var myPoint:Point = event.currentTarget.localToGlobal(new Point(0,
> 0));
> 
>  
> 
> because in the coordinate system of event.currentTarget, it's upper-left
> corner is at (0, 0); (event.currentTarget.x, event.currentTarget.y) is
> the position of currentTarget's upper-left corner in the coordinate
> system of currentTarget's parent.
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Ethan Miller
> Sent: Wednesday, March 26, 2008 12:45 PM
> To: [email protected]
> Subject: [flexcoders] Problems with localToGlobal
> 
>  
> 
> Greetings -
> 
> I'm using the localToGlobal method but getting impossible 
> values returned. My app is 1280 wide but converting an 
> object whose local x is 604 is returning a global x of 1535...??
> 
> Here's the function in question, the function is called by rolling 
> over buttons in an HBox:
> 
> private function showTip(text:String, offset:int, event:Object):void {
> var myPoint:Point = new Point(event.currentTarget.x,
> event.currentTarget.y); 
> myPoint = event.currentTarget.localToGlobal(myPoint);
> var myTip:ToolTip = ToolTipManager.createToolTip(
> text, myPoint.x+offset, 
> myPoint.y-32) as ToolTip;
> } 
> 
> Any help, much appreciated!
> 
> cheers, ethan
>



Reply via email to