It think Flash is telling me that my array tabData is getting duplicated, but I only set it up once in the var section of my code:
This is the line with the error:
for (var i in tabData) {
TabMenu class
private var tabData:Array = []; // <- tabData created here
public function drawTabMenu(w, h, color, videoHDiff, ypos):void
{
trace("drawTabMenu --------------");
for (var i in Global.xml..tab) {
tabData.push( {id:Global.xml..tab[i].@id, video:Global.xml..tab[i].vid} );
}
// DRAW GRAPHICS CODE HERE...
//draw the tabs
for (var i in tabData) { // < line throwing error
var tab:MovieClip = new TabDefault();
var active:MovieClip = new TabActive();
tabArray.push(tab);
tab.video = tabData[i].video;
tab.addChild(active);
i < 1 ? active.visible = true : active.visible = false;
tab.y = topShadow.y + 5;
// add in the textfield here
// addChild(tf);
// resize the tab background to textfield
tab.x = i < 1 ? 10 : tabArray[(i-1)].x + (tabArray[(i-1)].width+3);
tab.active = i < 1 ? tab.active = true : tab.active = false;
topShadow.addChild(tab);
tab.mouseChildren = false;
tab.buttonMode = true;
tab.addEventListener(MouseEvent.CLICK, tabClick);
}
// set default thumbnails here
trace("FIRST TAB DATA: "+tabData[0].video);
}