views:

200

answers:

1

In a tab navigator, I need to find out the x and y coordinates of each the tabs. Is there a way to do that? I am using HBox as Tab in the TabNavigator.

+1  A: 

If you want the positions of the tab buttons:

var button:Button = tabNavigator.getTabAt(i);

would return the tab at ith position. Read its x and y.

trace(button.x);
trace(button.y);

If you want the positions of tab contents, then use tabNavigator.getChildAt(i) to get the container at i and read its x and y.

Amarghosh