Move timeline forward on button press

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:

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:


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

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);

Well I guess you can then…(-: