salve ragazzi.
avrei un problema con l'action script
ho inserito 6 movie clip sulla scena principale chiamandoli button1_mc, button2_mc, ..., button6_mc

sono infatti 6 bottoni che devono fare una data operazione, le operazioni funzionano, le ho provate separatamente su due bottoni soltanto, ma quando ci ho messo il for mi da alcuni errori. Sicuramente sbaglio qualcosa nella sintassi. qualcuno potrebbe aiutarmi? grazie

---------------------------------------------------------------------------------------
import mx.transitions.Tween;
import mx.transitions.easing.*;
for (i=1; i<7; i++) {
["button"+i]_mc.premuto = false;
}
for (i=1; i<7; i++) {
["button"+i]_mc.onRollOver = function() {
new Tween(["button"+i]_mc, "_x", Elastic.easeOut, 20, 50, 7, false);
};
}
for (i=1; i<7; i++) {
button1_mc.onRollOut = function() {
for (i=1; i<7; i++) {
if (["button"+i]_mc.premuto == false) {
new Tween(["button"+i]_mc, "_x", Elastic.easeInOut, 50, 20, 7, false);
}
}
};
}
for (i=1; i<7; i++) {
button1_mc.onRelease = function() {
for (i=1; i<7; i++) {
if (["button"+i]_mc.premuto == true) {
new Tween(["button"+i]_mc, "_x", Elastic.easeInOut, 50, 20, 7, false);
new Tween(["button"+i]_mc.trasp_mc, "_alpha", Regular.easeOut, 50, 0, 1, true);
}
}
["button"+i]_mc.premuto = true;
newx = 50;
new Tween(["button"+i]_mc.trasp_mc, "_alpha", Regular.easeOut, 0, 50, 1, true);
};
}
-----------------------------------------------------------------------------------