|
>Well, for some reason when I specify
"this" it always referred to the application, not the object I was
trying to get the x/y of Understanding what 'this' refers to is
very important when writing Flex code. All the 'this' references in a
particular MXML document -- whether inside a <mx:Script> block or in
event handler attributes on tags -- refer to the same "document
object", the one represented by the topmost tag in the MXML file. If you
are in MyApplication.mxml, 'this' is always a reference to the instance of
MyApplication. If you are in MyComponent, 'this' is always a reference to the
instance of MyComponent. - Gordon From:
[email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Shannon Hicks Well, for some reason when I specify
"this" it always referred to the application, not the object I was
trying to get the x/y of. Here's the fixed code:
private function doThis(event: Shan From:
[EMAIL PROTECTED] Are your code snippets in the app file, where 'this' is a reference
to the application? Or did you make an MXML component based on HBox and the
code snippets are from it so that 'this' is the nested object? In neither case
does it look like the right logic to me. pt = nestedObject. pt = nestedObject. From: [EMAIL PROTECTED] I have a
nested object (an HBox) in my app, and I'm trying to figure out the global x/y
position of it.
It's
returning an odd value, like 0/90.... the actual x/y position of the object is
somewhere around 350/275
-- -- -- 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
YAHOO! GROUPS LINKS
__,_._,___ |
- RE: [flexcoders] Finding the x/y position of an object Gordon Smith
- RE: [flexcoders] Finding the x/y position of an object Shannon Hicks
- RE: [flexcoders] Finding the x/y position of an obj... Gordon Smith
- RE: [flexcoders] Finding the x/y position of an... Shannon Hicks
- RE: [flexcoders] Finding the x/y position o... Gordon Smith

