Sólo me faltan los botones y son teoricamente la adaptación a AS3 de esto:
http://www.cristalab.com/tutoriales/123/boton-con-fade-in-y-fade-out-animado
Desde que empecé he aprendido que no me hace falta boton invisible en con AS3 pero ya lo tenía.
Código :
import flash.events.MouseEvent;
bt_btn.addEventListener(MouseEvent.MOUSE_OVER, adelante);
function adelante(event:MouseEvent):void
{
stage.addEventListener(Event.ENTER_FRAME,myFunction);
}
bt_btn.addEventListener(MouseEvent.MOUSE_OUT, atras);
function atras(event:MouseEvent):void
{
stage.addEventListener(Event.ENTER_FRAME,myFunction2);
}
function myFunction(event:Event)
{
if (er_mc.currentFrame != 20) {
er_mc.nextFrame();
trace(er_mc.currentFrame)
}
else
{
er_mc.stop();
stage.removeEventListener(Event.ENTER_FRAME, myFunction);
}
}
function myFunction2(event:Event)
{
if (er_mc.currentFrame != 1) {
er_mc.prevFrame();
}
else
{
er_mc.stop();
stage.removeEventListener(Event.ENTER_FRAME, myFunction2);
}
}Con esta interpretación del codigo hecha por mí no termina de funcioner bien.
¿Podeis echarme una mano? Creo que el fallo esta en removeEvent, pero aún no tengo el conocimiento de AS3 suficiente para encontrar el fallo.
Muchas gracias
