Tengo en mi stage un MovieClip llamado "container_mc", dentro del cual existen 5 MovieClips que actúan como botones, con el siguiente código se ejecutan todas las animaciones al mismo tiempo:
Código ActionScript :
import flash.display.MovieClip;
for (var i:Number=0; i<botonera_mc.numChildren; i++){
botonera_mc.getChildAt(i).addEventListener(MouseEvent.ROLL_OVER, m_over)
botonera_mc.getChildAt(i).addEventListener(MouseEvent.ROLL_OUT, m_out);
botonera_mc.getChildAt(i).addEventListener(Event.ENTER_FRAME, mov);
MovieClip(botonera_mc.getChildAt(i)).buttonMode = true;
}
var over:Boolean;
function m_over(event:MouseEvent):void
{
over = true;
}
function m_out(event:MouseEvent):void
{
over = false;
}
function mov(event:Event):void {
if(over){
event.target.nextFrame();
}else{
event.target.prevFrame();
}
}
Lo que quiero es que con un "listener" y una "función" pueda ejecutar solo la animación del botón(MovieClip) al que hago "ROLL_OVER/ROLL_OUT" y no se animen todos los botones al mismo tiempo.
De antemano les agradesco su ayuda.
