How would i handle a user touching a buttons and going to the next frame of my MC?

This is as3 code but i get an error when publishing
What would the correct code look like?


next_btn.addEventListener(MouseEvent.CLICK, nextPage);
function nextPage(evt:MouseEvent):void
{
nextFrame();
}