# Move timeline forward on button press

**URL:** <https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369>\
**Category:** flash\
**Created:** [August 13, 2003, 1:47am UTC](https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369 "2003-08-13T01:47:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![farseer](https://avatars.discourse-cdn.com/v4/letter/f/ce73a5/32.png) [@farseer](https://forum.kirupa.com/u/farseer)\
**Post date:** [August 13, 2003, 1:47am UTC](https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369/1 "2003-08-13T01:47:21Z")

</div>

Hi guys, I just need help in the next thing:

How can I make a button that no matter what frame it is in, it will direct me 3 frames forward as long as I keep it pressed? (Kind of like a fastforward button)

Thanks a lot!:tie:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2003, 5:25am UTC](https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369/2 "2003-08-13T05:25:04Z")

</div>

I don’t think you could have a function like that with the button held down. I know if you wanted a button to advance three frames from where you are, you could use:

```auto

on(press){
gotoAndPlay(_currentframe + (_currentframe+3));
}

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2003, 6:25am UTC](https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369/3 "2003-08-13T06:25:23Z")

</div>

Please read the sticky about posting here. Title edited.  
You can achieve what you want with a 3 frame controler clip.  
frame 1: stop();  
frame 2: \_parent.gotoAndPlay(\_currentframe+3);  
frame 3: gotoAndPlay(\_currentframe-1);  
name this clip’s instance “forward\_mc” and put on the same timeline as the button. as the clip uses \_parent, that’s the timeline it will controll.  
for your button: onPress(forward\_mc.play()); //sends it to frame 2, it continues playing to 3 which sends it back in a loop to frame 2 etc, so as long as you press, this clip will loop.  
onRelease(forward\_mc.gotoAndStop(1)); //send it back to the waiting frame and stop there.  
of course, the reverse works just the same, make another clip, name back\_mc, and change frame 2 to  
\_parent.gotoAndPlay(\_currentframe-3);  
…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 13, 2003, 7:55pm UTC](https://forum.kirupa.com/t/move-timeline-forward-on-button-press/28369/4 "2003-08-13T19:55:50Z")

</div>

Well I guess you can then…(-:
