// creazione prototype
codice:
MovieClip.prototype.fx_pulsante=function(){
this.gotoAndStop(1)
this.onRelease = function() {
_root.imagermenu._index = 1;
if (_root.imagermenu.initialized && _root.imagermenu._currentframe == 16) {
_root.imagermenu.gotoAndPlay("out");
} else {
_root.imagermenu.loadImage(_root.imagermenu._index);
}
};
}
//assegnazione dinamica
codice:
for(i=1;i<=N;i++){
_root.galldesign.intgalldesign["d"+I].puls.fx_pulsante()
}
ovviamente l'oggetto puls deve essere un clip e non un bottone
quindi visto che è un bottone ed avrà degli effetti Over/Out/Press
dentro il prototype aggiungi ad esempio
codice:
this.onRollOver=function(){
this.gotoAndStop(2)
}
this.onRollOut=function(){
this.gotoAndStop(1)
}
this.onPress=function(){
this.gotoAndPlay(3) // se ritorna automaticamente sulla frame 1
}
dove sulla frame 2 c'è la grafica over, sulla frame 3 c'è il press
Ciao