# Back and forward buttons

**URL:** <https://forum.kirupa.com/t/back-and-forward-buttons/117587>\
**Category:** Uncategorized\
**Created:** [July 28, 2004, 4:51pm UTC](https://forum.kirupa.com/t/back-and-forward-buttons/117587 "2004-07-28T16:51:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaron353](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@aaron353](https://forum.kirupa.com/u/aaron353)\
**Post date:** [July 28, 2004, 4:51pm UTC](https://forum.kirupa.com/t/back-and-forward-buttons/117587/1 "2004-07-28T16:51:38Z")

</div>

is there a way to have a back button that goes back to the frame they just came from?

also it would be the same for the forward or next frame or key frame.

Thanks!  
Aaron

---

<div class="post-metadata">

**Author:** ![lostinbeta](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lostinbeta](https://forum.kirupa.com/u/lostinbeta)\
**Post date:** [July 28, 2004, 4:56pm UTC](https://forum.kirupa.com/t/back-and-forward-buttons/117587/2 "2004-07-28T16:56:09Z")

</div>

Not sure of your setup, but i’m thinking you might want to check into the prevFrame() and nextFrame() commands.

---

<div class="post-metadata">

**Author:** ![chenu](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chenu/32/562_2.png) [@chenu](https://forum.kirupa.com/u/chenu)\
**Post date:** [July 28, 2004, 4:57pm UTC](https://forum.kirupa.com/t/back-and-forward-buttons/117587/3 "2004-07-28T16:57:19Z")

</div>

For a Back button you could use

```auto

on (press) {
	prevFrame();
}

```

and for forward

```auto
on (press) {
	nextFrame();
}

```

Just apply this code to a button and your set to go.
