# Buttons, buttons AS3

**URL:** <https://forum.kirupa.com/t/buttons-buttons-as3/244256>\
**Category:** flash\
**Created:** [November 15, 2007, 5:44pm UTC](https://forum.kirupa.com/t/buttons-buttons-as3/244256 "2007-11-15T17:44:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rundevo](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@Rundevo](https://forum.kirupa.com/u/Rundevo)\
**Post date:** [November 15, 2007, 5:44pm UTC](https://forum.kirupa.com/t/buttons-buttons-as3/244256/1 "2007-11-15T17:44:05Z")

</div>

Searched around the forum for help, but without much luck.

My question is, if you can add some AS3 code to a button on the timeline to make it go to the next frame in the timeline instead of telling it to go to a framelabel. Sounds so easy, but I just can´t make it work.

I´ve been fooling around with this, but without any luck.

prev\_btn.addEventListener(MouseEvent.CLICK, goBack);  
next\_btn.addEventListener(MouseEvent.CLICK, goForward);

function goBack(event:MouseEvent):void {  
container\_mc.prevFrame();  
}

function goForward(event:MouseEvent):void {  
container\_mc.nextFrame();

I have alot of buttons so linking all of them to a framelabel back and forth doesnt seem efficient to me 🙂

Anyways, appreciate any and all help.

Thanks
