# How to forward one frame each time button pressed

**URL:** <https://forum.kirupa.com/t/how-to-forward-one-frame-each-time-button-pressed/285720>\
**Category:** flash\
**Created:** [April 4, 2009, 8:17pm UTC](https://forum.kirupa.com/t/how-to-forward-one-frame-each-time-button-pressed/285720 "2009-04-04T20:17:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![undesignuk](https://avatars.discourse-cdn.com/v4/letter/u/4bbf92/32.png) [@undesignuk](https://forum.kirupa.com/u/undesignuk)\
**Post date:** [April 4, 2009, 8:17pm UTC](https://forum.kirupa.com/t/how-to-forward-one-frame-each-time-button-pressed/285720/1 "2009-04-04T20:17:59Z")

</div>

Hi

This is probably a very simple actionscript question I am using CS3 on an AS2 movie. I want to make a simple audio level bar and I created a movie clip with ten frames and ten squares that appear in a line. On each frame you can see one more square i.e. from 1 to 10.  
What I want is to have a + button on the main time line and every time it is pressed it advances on the frame of a movie clip called loader\_mc to the next frame. Similarly if I press minus button the movie clip goes back a frame.

Can anyone help me out with this.

This is the actionscript i tried but it only works once. It doesn’t keep moving on each frame.

```auto
on (press) {
_root.loader_mc.gotoAndPlay(_currentframe+1);
}

```

I think a for loop would do the trick but not quite sure of the syntax in AS2
