It still ends up returning 0/0.
 
Shan


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John Grden
Sent: Tuesday, August 08, 2006 11:32 AM
To: flexcoders@yahoogroups.com
Subject: [Junk E-Mail - MED] Re: [flexcoders] Finding the x/y position of an object

I've been using this for a while now:

public static function localToLocal(from:MovieClip, to:MovieClip, origin:Object):Object
    {
        var point:Object = origin == undefined ? {x: 0, y: 0} : origin;
        from.localToGlobal(point);
        to.globalToLocal(point);
        return point;
    }
   
its never failed me yet.  Of course, this code is as2, so fix it up for your as3 usage, but should work just the same.

jpg

On 8/8/06, Shannon Hicks <[EMAIL PROTECTED]com> wrote:

I have a nested object (an HBox) in my app, and I'm trying to figure out the global x/y position of it.
 


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006

Reply via email to