non ho controllato completamente lo script, ma penso di avere almeno corretto gli errori, prova un po'
Codice PHP:
import mx.transitions.Tween;
import mx.transitions.easing.*;
for (i=1; i<7; i++) {
this["button"+i+"_mc"].premuto = false;
this["button"+i+"_mc"].onRollOver = function() {
new Tween(this, "_x", Elastic.easeOut, 20, 50, 7, false);
};
this["button"+i+"_mc"].onRollOut = function() {
for (i=1; i<7; i++) {
if (this._parent["button"+i+"_mc"].premuto == false) {
new Tween(this._parent["button"+i+"_mc"], "_x", Elastic.easeInOut, 50, 20, 7, false);
}
}
};
this["button"+i+"_mc"].onRelease = function() {
for (i=1; i<7; i++) {
if (this._parent["button"+i+"_mc"].premuto == true) {
new Tween(this._parent["button"+i+"_mc"], "_x", Elastic.easeInOut, 50, 20, 7, false);
new Tween(this._parent["button"+i+"_mc"].trasp_mc, "_alpha", Regular.easeOut, 50, 0, 1, true);
}
}
this.premuto = true;
newx = 50;
new Tween(this._parent["button"+i+"_mc"].trasp_mc, "_alpha", Regular.easeOut, 0, 50, 1, true);
};
}