Next and prevFrame

Hi.
i have this function underneath applied to several buttons:

stop();
function PopUpCollagestration(event:MouseEvent):void{
gotoAndStop(event.target.name);
}
walephant_button.addEventListener(MouseEvent.CLICK,PopUpCollagestration);
leaving_button.addEventListener(MouseEvent.CLICK,PopUpCollagestration);

now i want to click from one frame to the next or previous frames.
… a simple nextFrame / prevFrame action.
so i applied following in a new action layer:

arrow_right.addEventListener(MouseEvent.MOUSE_UP,NextFrame);
function NextFrame(event:MouseEvent){
nextFrame()
}
arrow_left.addEventListener(MouseEvent.MOUSE_UP,PrevFrame);
function PrevFrame(event:MouseEvent){
prevFrame()
}

this only works when i beginn with the first frame. But not when i jump to any other frame.

I suppose there is a code that allows my action to run all over my timeline and not only from the first frame…

Does anyone know ?