Necesito una vez mas su ayuda para esto.
Resulta que siempre estoy escribiendo el codigo para mis botones con la siguiente sintaxis:
btn_01_cirugia.onRollOver = function(){
this.gotoAndPlay(2);
}
btn_01_cirugia.onRollOut = function(){
this.gotoAndPlay(11);
}
btn_01_cirugia.onRelease = function(){
gotoAndStop(1);
}
/*----------------- btn_02-------------------*/
btn_01_minima.onRollOver = function(){
this.gotoAndPlay(2);
}
btn_01_minima.onRollOut = function(){
this.gotoAndPlay(11);
}
btn_01_minima.onRelease = function(){
gotoAndStop(2);
}
/*----------------- btn_03-------------------*/
btn_01_est.onRollOver = function(){
this.gotoAndPlay(2);
}
btn_01_est.onRollOut = function(){
this.gotoAndPlay(11);
}
btn_01_est.onRelease = function(){
gotoAndStop(3);
}
/*----------------- btn_04-------------------*/
btn_01_dre.onRollOver = function(){
this.gotoAndPlay(2);
}
btn_01_dre.onRollOut = function(){
this.gotoAndPlay(11);
}
btn_01_dre.onRelease = function(){
gotoAndStop(4);
}
/*----------------- btn_05-------------------*/
btn_01_geles.onRollOver = function(){
this.gotoAndPlay(2);
}
btn_01_geles.onRollOut = function(){
this.gotoAndPlay(11);
}
btn_01_geles.onRelease = function(){
gotoAndStop(5);
}
Entonces me gustaria Poder escribir lo mismo pero en menos codigo, no se si me explico, supongamos que tenga 20 botones, seria una lata hacer 20 veces el codigo de onRollOver onRelease onRollOut para cada Uno de los Btn.
Como puedo hacer solo, no se, una vez escribir onRollOver onRelease onRollOut para los 20 btn por ejemplo.
Gracias desde Ya!