ENTER FRAME event goes to every instance. why?

my first post here. im kinda new to flash and actionscript.

i have this problem, i created couple instances of movieclip with some simple animation inside, want it to animate when mouse is over, and animate backwards when mouse is out.

so i have this code:


var goForward:Boolean = false;
	
box1.addEventListener(MouseEvent.MOUSE_OVER, boxOn);
box1.addEventListener(MouseEvent.MOUSE_OUT, boxOff);

box2.addEventListener(MouseEvent.MOUSE_OVER, boxOn);
box2.addEventListener(MouseEvent.MOUSE_OUT, boxOff);	
	
box1.addEventListener(Event.ENTER_FRAME, animate);
box2.addEventListener(Event.ENTER_FRAME, animate);

function boxOn(e:Event)
{
	goForward = true;
}

function boxOff(e:Event)
{
	goForward = false;
}

function animate(e:Event)
{
	trace("TARGET:"+e.target.name);
	if (goForward)	e.target.nextFrame();
	if (!goForward)    e.target.prevFrame();
}

but when i mouse over one of instances, both of them are animating at the same time
trace target name gives me box1,box2,box1,box2,box1,box2…

i managed to make it better by making


var goForward:Boolean = false;
	
box1.addEventListener(MouseEvent.MOUSE_OVER, boxOn);
box1.addEventListener(MouseEvent.MOUSE_OUT, boxOff);

box2.addEventListener(MouseEvent.MOUSE_OVER, boxOn);
box2.addEventListener(MouseEvent.MOUSE_OUT, boxOff);	
	
//box1.addEventListener(Event.ENTER_FRAME, animate);
//box2.addEventListener(Event.ENTER_FRAME, animate);
	
function animate(e:Event)
{
	trace("TARGET:"+e.target.name);
	if (goForward)	e.target.nextFrame();
	if (!goForward) e.target.prevFrame();
		
	if (e.target.currentFrame == 1) 
	{
		e.target.removeEventListener(Event.ENTER_FRAME, animate);
	}
}
	
function boxOn(e:Event)
{
	goForward = true;
	e.target.addEventListener(Event.ENTER_FRAME, animate);
}

	
function boxOff(e:Event)
{
	goForward = false;
}

it works better, only one instance move, but if i move mouse over second instance before first one finish moving back to the first frame (and remove listener), again both instances animate together, like they are using the same timeline.

what do i do wrong?