# A simple one

**URL:** <https://forum.kirupa.com/t/a-simple-one/161934>\
**Category:** Uncategorized\
**Created:** [September 8, 2005, 11:18am UTC](https://forum.kirupa.com/t/a-simple-one/161934 "2005-09-08T11:18:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jerry](https://forum.kirupa.com/u/jerry)\
**Post date:** [September 8, 2005, 11:18am UTC](https://forum.kirupa.com/t/a-simple-one/161934/1 "2005-09-08T11:18:51Z")

</div>

Hey there… :glasses:

I’ve got a MC with 5 keyframes, all with a stop action on it. I then have two buttons, one called ‘next’ and one called ‘prev’…

Here’s the “almost working” idea:

```auto

//next button
on (release) {
	for(i>=1; i<=5; i++)
	this.gotoAndStop(i);
}
//prev button
on (release) {
	for(i>=1; i<=5; i--)
	this.gotoAndStop(i);
}

```

…why is this not working? :hugegrin:
