I have a component that changes its location based on other elements. I’m trying to find its x and y position at different intervals, so I tried compname.x and compname.y.
The x position seems to be working, but the y position is always 0. I’m guessing I need to play with localToGlobal or contentToGlobal or one of those conversions. Is that the problem?
A component’s x and y values are relative to it’s parent. Flex calls this the content coordinate system; and the contentToGlobal should give you the answers you need.
Read up on positioning components, which explains the content, local, and viewable coordinates:
http://livedocs.adobe.com/flex/3/html/help.html?content=size_position_2.html
And read up on the Flex coordinate system:
http://livedocs.adobe.com/flex/3/html/help.html?content=containers_intro_5.html#254752
If you had a working example it may be easier to give a specific answer.