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);
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
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
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
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
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
:
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
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
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
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
: 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
11 matches
Mail list logo