Ok … the skinny:
I have 3 tabs and a mainBox. I would like whatever the active tab is, to be on top of the mainBox, and the rest underneath.
Here’s what I got:
tabSpacing = 3;
tabBegin = 518.5;
tabDent = 6;
tabX = 0;
tabY = 0;
var tabs:Array = new Array();
////////////////////////////////
tabs[0] = "Tab 1";
tabs[1] = "Tab 2";
tabs[2] = "Tab 3";
////////////////////////////////
startTab = 1;
////////////////////////////////
for (var i = 0; i<tabs.length; i++) {
chatTab = this.attachMovie("tab", "chatTab" + i, i);
tabW = chatTab._width - 7.4;
chatTab._x = tabBegin - (tabW + tabSpacing)*i;
chatTab._y = 6;
if(startTab == i) {
chatTab._y = 0;
}else {
chatBox.swapDepths(chatTab);
}
}
I’m not too sure what I’m doing wrong here … I feel like I’m pretty close though …