[flexcoders] Finding the x/y position of an object

2006-08-08 Thread Shannon Hicks
I have a nested object (an HBox) in my app, and I'm trying to figure out the global x/y position of it. I've tried this: var pt:Point = new Point(this.x,this.y); this.localToGlobal(pt); But it always returns 0/0. Even if I do this: var pt:Point = new Point(parent.x,parent.y);

Re: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread John Grden
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

RE: [Junk E-Mail - MED] Re: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Shannon Hicks
It still ends up returning 0/0. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John GrdenSent: Tuesday, August 08, 2006 11:32 AMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - MED] Re: [flexcoders] Finding the x/y position of an object I've been

Re: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread douglas morrison
Hi Shan,Tryimport flash.geom.Point; __._,_.___ -- 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

RE: [Junk E-Mail - LOW] Re: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Shannon Hicks
Already had import flash.geom.*; :( Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of douglas morrisonSent: Tuesday, August 08, 2006 12:17 PMTo: flexcoders@yahoogroups.comSubject: [Junk E-Mail - LOW] Re: [flexcoders] Finding the x/y position of an object

RE: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Gordon Smith
change the Point passed in. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shannon Hicks Sent: Tuesday, August 08, 2006 9:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Finding the x/y position of an object I have a nested

[Junk E-Mail - LOW] Re: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread t3kn0ph34r
: Already had import flash.geom.*; :( Shan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of douglas morrison Sent: Tuesday, August 08, 2006 12:17 PM To: flexcoders@yahoogroups.com Subject: [Junk E-Mail - LOW] Re: [flexcoders] Finding the x/y

RE: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Shannon Hicks
han From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon SmithSent: Tuesday, August 08, 2006 3:10 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Finding the x/y position of an object Are your code snippets in the app file, where 'this' is a

RE: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Gordon Smith
to the instance of MyComponent. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shannon Hicks Sent: Tuesday, August 08, 2006 1:17 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Finding the x/y position of an object Well

RE: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Shannon Hicks
he changes for Point vs Object)in 1.5 produces the expected result. Shan From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Gordon SmithSent: Tuesday, August 08, 2006 3:27 PMTo: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Finding the x/y position of an objec

RE: [flexcoders] Finding the x/y position of an object

2006-08-08 Thread Gordon Smith
: Tuesday, August 08, 2006 1:49 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Finding the x/y position of an object I was not in my topmost application file I was inside a custom component file, that was being called by another custom component, which was called