hola tengo un monton de botones a los cuales les he asignado acciones, epro con un bucle se ahorraria todo esto, como hago el bucle a esto???
Código:
btn_1.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_1.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_1.onRelease = function(){ this.gotoAndPlay("on");}
btn_2.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_2.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_2.onRelease = function(){ this.gotoAndPlay("on"); }
btn_3.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_3.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_3.onRelease = function(){ this.gotoAndPlay("on"); }
btn_4.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_4.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_4.onRelease = function(){ this.gotoAndPlay("on"); }
btn_5.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_5.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_5.onRelease = function(){ this.gotoAndPlay("on"); }
btn_6.onRollOver = function(){ this.gotoAndPlay("over"); }
btn_6.onRollOut = function(){ this.gotoAndPlay("out"); }
btn_6.onRelease = function(){ this.gotoAndPlay("on"); }
muchas gracias!
PD: tambien me hace falta una variable global que dependiendo del boton que se pulse, los demas pasen a "out", vamos que solo se mantenga uno con el estado pulsado y comrpuebe que los demas no queden pulsados!!!
un saludo!!!