its like pyramid where each object will have 2 object under it for 4 layers.
if (myXML.MEMBER[1].@AVAILABILITY=="NO") {
circlesArray[0][0].mouseEnabled=false;
TweenLite.to(circlesArray[0][0],0.8,{tint:0x333333});
manArray[0][0].mouseEnabled=false;
TweenLite.to(manArray[0][0],0,{tint:0x666666});
} else {
circlesArray[0][0].mouseEnabled=true;
manArray[0][0].mouseEnabled=true;
}
if (myXML.MEMBER[2].@AVAILABILITY=="NO") {
circlesArray[0][1].mouseEnabled=false;
TweenLite.to(circlesArray[0][1],0.8,{tint:0x333333});
manArray[0][1].mouseEnabled=false;
TweenLite.to(manArray[0][1],0,{tint:0x666666});
} else {
circlesArray[0][1].mouseEnabled=true;
manArray[0][1].mouseEnabled=true;
}
if (myXML.MEMBER[3].@AVAILABILITY=="NO") {
circlesArray[1][0].mouseEnabled=false;
TweenLite.to(circlesArray[1][0],0.8,{tint:0x333333});
manArray[1][0].mouseEnabled=false;
TweenLite.to(manArray[1][0],0,{tint:0x666666});
} else {
circlesArray[1][0].mouseEnabled=true;
manArray[1][0].mouseEnabled=true;
}
if (myXML.MEMBER[4].@AVAILABILITY=="NO") {
circlesArray[1][1].mouseEnabled=false;
TweenLite.to(circlesArray[1][1],0.8,{tint:0x333333});
manArray[1][1].mouseEnabled=false;
TweenLite.to(manArray[1][1],0,{tint:0x666666});
} else {
circlesArray[1][1].mouseEnabled=true;
manArray[1][1].mouseEnabled=true;
}
if (myXML.MEMBER[5].@AVAILABILITY=="NO") {
circlesArray[1][2].mouseEnabled=false;
TweenLite.to(circlesArray[1][2],0.8,{tint:0x333333});
manArray[1][2].mouseEnabled=false;
TweenLite.to(manArray[1][2],0,{tint:0x666666});
} else {
circlesArray[1][2].mouseEnabled=true;
manArray[1][2].mouseEnabled=true;
}
if (myXML.MEMBER[6].@AVAILABILITY=="NO") {
circlesArray[1][3].mouseEnabled=false;
TweenLite.to(circlesArray[1][3],0.8,{tint:0x333333});
manArray[1][3].mouseEnabled=false;
TweenLite.to(manArray[1][3],0,{tint:0x666666});
} else {
circlesArray[1][3].mouseEnabled=true;
manArray[1][3].mouseEnabled=true;
}
if (myXML.MEMBER[7].@AVAILABILITY=="NO") {
circlesArray[2][0].mouseEnabled=false;
TweenLite.to(circlesArray[2][0],0.8,{tint:0x333333});
manArray[2][0].mouseEnabled=false;
TweenLite.to(manArray[2][0],0,{tint:0x666666});
} else {
circlesArray[2][0].mouseEnabled=true;
manArray[2][0].mouseEnabled=true;
}
if (myXML.MEMBER[8].@AVAILABILITY=="NO") {
circlesArray[2][1].mouseEnabled=false;
TweenLite.to(circlesArray[2][1],0.8,{tint:0x333333});
manArray[2][1].mouseEnabled=false;
TweenLite.to(manArray[2][1],0,{tint:0x666666});
} else {
circlesArray[2][1].mouseEnabled=true;
manArray[2][1].mouseEnabled=true;
}
if (myXML.MEMBER[9].@AVAILABILITY=="NO") {
circlesArray[2][2].mouseEnabled=false;
TweenLite.to(circlesArray[2][2],0.8,{tint:0x333333});
manArray[2][2].mouseEnabled=false;
TweenLite.to(manArray[2][2],0,{tint:0x666666});
} else {
circlesArray[2][2].mouseEnabled=true;
manArray[2][2].mouseEnabled=true;
}
if (myXML.MEMBER[10].@AVAILABILITY=="NO") {
circlesArray[2][3].mouseEnabled=false;
TweenLite.to(circlesArray[2][3],0.8,{tint:0x333333});
manArray[2][3].mouseEnabled=false;
TweenLite.to(manArray[2][3],0,{tint:0x666666});
} else {
circlesArray[2][3].mouseEnabled=true;
manArray[2][3].mouseEnabled=true;
}
if (myXML.MEMBER[11].@AVAILABILITY=="NO") {
circlesArray[2][4].mouseEnabled=false;
TweenLite.to(circlesArray[2][4],0.8,{tint:0x333333});
manArray[2][4].mouseEnabled=false;
TweenLite.to(manArray[2][4],0,{tint:0x666666});
} else {
circlesArray[2][4].mouseEnabled=true;
manArray[2][4].mouseEnabled=true;
}
if (myXML.MEMBER[12].@AVAILABILITY=="NO") {
circlesArray[2][5].mouseEnabled=false;
TweenLite.to(circlesArray[2][5],0.8,{tint:0x333333});
manArray[2][5].mouseEnabled=false;
TweenLite.to(manArray[2][5],0,{tint:0x666666});
} else {
circlesArray[2][5].mouseEnabled=true;
manArray[2][5].mouseEnabled=true;
}
if (myXML.MEMBER[13].@AVAILABILITY=="NO") {
circlesArray[2][6].mouseEnabled=false;
TweenLite.to(circlesArray[2][6],0.8,{tint:0x333333});
manArray[2][6].mouseEnabled=false;
TweenLite.to(manArray[2][6],0,{tint:0x666666});
} else {
circlesArray[2][6].mouseEnabled=true;
manArray[2][6].mouseEnabled=true;
}
if (myXML.MEMBER[14].@AVAILABILITY=="NO") {
circlesArray[2][7].mouseEnabled=false;
TweenLite.to(circlesArray[2][7],0.8,{tint:0x333333});
manArray[2][7].mouseEnabled=false;
TweenLite.to(manArray[2][7],0,{tint:0x666666});
} else {
circlesArray[2][7].mouseEnabled=true;
manArray[2][7].mouseEnabled=true;
}
i've tried the for but its not working
for (var i:uint=0; i<2; i++) {
for (var j:uint=0; j<2-1; j++) {
if (myXML.MEMBER[i].@AVAILABILITY=="NO") {
circlesArray[1][j].mouseEnabled=false;
TweenLite.to(circlesArray[1][j],0.8,{tint:0x333333});
} else {
circlesArray[1][j].mouseEnabled=true;
}
}
}