Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/09/2009, 01:18
fackius
 
Fecha de Ingreso: marzo-2009
Mensajes: 91
Antigüedad: 15 años, 1 mes
Puntos: 1
Respuesta: Problemas con un Boton.

Hola de nuevo...
Estuve intentando q el codigo funcione para as3....Con respecto a el boton y el movieclip...Segui los pasos de pollorojo.
El movieclip que ejecuta el boton tiene 10 frame's ..y tiene "stop()" al een el frame 1 y ene el frame 10.
Les muestro el codigo que hice para el botón..diganme que esta mal..porq no funciona aun :S

Boton_bt es el nombre de instancia del botón.

Código PHP:
Boton_bt.addEventListener(MouseEvent.MOUSE_OVER,over);
Boton_bt.addEventListener(MouseEvent.MOUSE_OUT,out);

 
function 
over(e:MouseEvent):void{
    
MC_anim.enterFrame = function () {
        if (
this._currentframe != 10) {
        
this.nextFrame();
        }
//sino, que se detenga, y borre la funcion.
        
else {
            
this.stop();
            
delete this["enterFrame"];
        }
    }
}


function 
out(e:MouseEvent):void{//Cuando saquemos el cursor de arriba, del boton.
    
MC_anim.enterFrame = function () {//Si, el frame del MC es distinto a 1, que este valla para el frame 1(de vuelta al principio).
        
if (this._currentframe != 1) {
            
this.gotoAndStop(1);
        }
//Sino que borre la funcion anterior.
        
else {
            
this.stop();
            
delete this["enterFrame"];
        }
    }


Desde ya gracias xD