# How to make an action to "go to next label"?

**URL:** <https://forum.kirupa.com/t/how-to-make-an-action-to-go-to-next-label/272185>\
**Category:** Uncategorized\
**Created:** [October 2, 2008, 5:57pm UTC](https://forum.kirupa.com/t/how-to-make-an-action-to-go-to-next-label/272185 "2008-10-02T17:57:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alapimba](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@alapimba](https://forum.kirupa.com/u/alapimba)\
**Post date:** [October 2, 2008, 5:57pm UTC](https://forum.kirupa.com/t/how-to-make-an-action-to-go-to-next-label/272185/1 "2008-10-02T17:57:19Z")

</div>

HI.  
I want to do a slide show with a button to go forward. How can i make a button go to the next label?  
I tryed this but it’s not working for some reason:

```auto

count=0;
myArr=["1","2","3","4","5","6"];
 
nextButton.onRelease=function(){
_root.gotoAndStop(myArr[count+1]);
count++;
}
prevButton.onRelease=function(){
_root.gotoAndStop(myArr[count-1]);
count--;
}

```
