# Really simple problem with buttons.. Please help

**URL:** https://forum.kirupa.com/t/really-simple-problem-with-buttons-please-help/265611
**Category:** Uncategorized
**Created:** [July 10, 2008, 5:52pm UTC](https://forum.kirupa.com/t/really-simple-problem-with-buttons-please-help/265611 "2008-07-10T17:52:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![skullkyng](https://avatars.discourse-cdn.com/v4/letter/s/bb73d2/32.png) [@skullkyng](https://forum.kirupa.com/u/skullkyng)
#### Post date: [July 10, 2008, 5:52pm UTC](https://forum.kirupa.com/t/really-simple-problem-with-buttons-please-help/265611/1 "2008-07-10T17:52:13Z")

</div>

Hey all, I am trying to set up two buttons, one that will step forward one frame, the other step backward one frame, all on the same timeline. The only thing I want to happen is for there to be a limit on how far back and forward the buttons can step on the timeline.

This is what I had thus far but was not working:

back\_btn.onRelease = function() {  
if(\_currentframe\>=32) {  
gotoAndStop(\_currentframe-1)  
}  
}

forward\_btn.onRelease = function() {  
if(\_currentframe\<=39) {  
gotoAndStop(\_currentframe+1)  
}  
}

So I stripped it down to this just to make sure I had the base of it written properly:

back\_btn.onRelease = function() {  
gotoAndStop(\_currentframe-1)  
}

forward\_btn.onRelease = function() {  
gotoAndStop(\_currentframe+1)  
}

and now it goes to a completely different scene alltogether! I have no idea why that is…

Anyone have any ideas? I would really appreciate it!

Thanks.

-D-

---

<div class="post-metadata">

### Author: ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)
#### Post date: [July 10, 2008, 6:17pm UTC](https://forum.kirupa.com/t/really-simple-problem-with-buttons-please-help/265611/2 "2008-07-10T18:17:22Z")

</div>

try this  
[http://www.4shared.com/file/54654764/28f62622/slide.html](http://www.4shared.com/file/54654764/28f62622/slide.html)

hope it help 🙂
