Thursday, July 02, 2009

Get Flex component position

How can I get the component position dynamically/at runtime and I use H/VBox to layout the component.

- use 'getBounds'

var rect:Rectangle = Container(childComponent).getBounds(parent);


rect.x will give 'x' coordinates
rect.y will give 'y' coordinates