-1
它像金字塔,其中每個對象將有4個層下面有2個對象。幫助我總結這些腳本
if (myXML.MEMBER[1][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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][email protected]=="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;
}
我已經試過爲,但它不工作
for (var i:uint=0; i<2; i++) {
for (var j:uint=0; j<2-1; j++) {
if (myXML.MEMBER[i][email protected]=="NO") {
circlesArray[1][j].mouseEnabled=false;
TweenLite.to(circlesArray[1][j],0.8,{tint:0x333333});
} else {
circlesArray[1][j].mouseEnabled=true;
}
}
}
它根本不編譯,還是編譯但沒有顯示所需的輸出? 請稍微介紹一下,或許我們可以幫助。 – Ashine 2010-02-25 08:12:51