allora, forse basta fare così, ma ora non ho il tempo di provarla.
codice:
function azionePulsante(ID) {
ID.onRollOver = function() {
s = new String(ID);
i = s.charAt(s.length-1);
trace(i);
delete clip.onEnterFrame;
clip.onEnterFrame = function() {
if (this._currentframe<this._totalframes) {
this.nextFrame();
} else {
delete this.onEnterFrame;
}
};
};
ID.onRollOut = ID.onReleaseOutside=function () {
delete clip.onEnterFrame;
clip.onEnterFrame = function() {
if (this._currentframe>0) {
this.prevFrame();
} else {
delete this.onEnterFrame;
}
};
};
}
//al posto di n metti il numero dei tuoi pulsanti
for (i=1; i<=n ; i++) {
azionePulsante(_root["pulsante"+i]);
}