Yes it is a TabView. It was a lot of trial and error and the main reason why I like to only use code so I have full control of the components.
This is the function for the onChange for the tabbar.
public function onMenuChange(e) {
for (i in 0...menuTabBar.numComponents) {
if (i == menuTabBar.selectedIndex) {
menuTabBar.getComponentAt(i).width = menu.width - (menuTabBar.numComponents - 1) * 40;
switch(i) {
case 0:
menuTabBar.getComponentAt(i).text = " World";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_World_ON.png";
case 1:
menuTabBar.getComponentAt(i).text = " Maps";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Maps_ON.png";
case 2:
menuTabBar.getComponentAt(i).text = " Tiles";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Tilesets_ON.png";
case 3:
menuTabBar.getComponentAt(i).text = " Objects";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Objects_ON.png";
case 4:
menuTabBar.getComponentAt(i).text = " Terrain";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Terrain_ON.png";
case 5:
menuTabBar.getComponentAt(i).text = " Config";
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Config_ON.png";
}
menuTabBar.getComponentAt(i).customStyle.iconPosition = "left";
} else {
switch(i) {
case 0:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_World.png";
case 1:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Maps.png";
case 2:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Tilesets.png";
case 3:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Objects.png";
case 4:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Terrain.png";
case 5:
cast(menuTabBar.getComponentAt(i), Button).icon = "menus/Icon_Config.png";
}
menuTabBar.getComponentAt(i).customStyle.iconPosition = "center";
menuTabBar.getComponentAt(i).width = 40;
menuTabBar.getComponentAt(i).text = "";
}
}
}