You should be doing
 
var boxPoint:Point = new Point(0, 0); // top-left corner of _box in its
own coordinates
var boxPointLocToGlob:Point = _box.localeToGlobal(boxPoint); // top-left
corner of _box in stage global coords
 
But I don't see how what you were doing would have given negative
values.
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of helihobby
Sent: Wednesday, December 05, 2007 7:23 PM
To: [email protected]
Subject: [flexcoders] Help ... Why isn't my localToGlobal working on a
draggable sprite ?



Hello all,
I've been playing with this all day and can't figure it out ..
I have a dragable sprite.

I am trying to convert its X Y coords to global coords.

My Sprite is _box;

I do:

var boxPoint:Point = new Point(_box.x,_box.y);
var boxPointLocToGlob:Point = _box.localToGlobal(boxPoint);

But when I trace _boxPointLocToGlob I get strange negative values...
How can I be getting negatives when I am asking for Global coords and
I am working at the center of the stage ?

Regards,

Sean.



 

Reply via email to