Código :
boton_mc.stop();
boton_mc.onRollOver = function(){
this.onEnterFrame = function(){
if(this._currentframe < this._totalframes){
this.nextFrame();
}else{
delete this.onEnterFrame;
}
}
}
boton_mc.onRollOut = function(){
this.onEnterFrame = function(){
if(this._currentframe >1){
this.prevFrame();
}else{
delete this.onEnterFrame;
}
}
}
Ahora... lo quiero pasar a AS 3.0 y esto fue lo que resultó
Código :
var flag:Boolean = new Boolean(false);
anima_mc.stop();
anima_mc.addEventListener("enterFrame",animacion);
anima_mc.addEventListener(MouseEvent.MOUSE_OVER,over);
anima_mc.addEventListener(MouseEvent.MOUSE_OUT,out);
function over(e:MouseEvent):void{
flag = true;
}
function out(e:MouseEvent):void{
flag = false;
}
function animacion(event:Event):void{
if(flag == true){
anima_mc.nextFrame();
}else{
anima_mc.prevFrame();
}
}
Pero el problema es que el procesador NUNCA descansa... no entiendo cómo activar y desactivar onEnterFrame en As 3.0
Espero alguien me pueda ayudar, gracias
Saludos
