# Gotoandplay problem

**URL:** <https://forum.kirupa.com/t/gotoandplay-problem/251689>\
**Category:** Uncategorized\
**Created:** [February 11, 2008, 8:23pm UTC](https://forum.kirupa.com/t/gotoandplay-problem/251689 "2008-02-11T20:23:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kagamushu](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kagamushu](https://forum.kirupa.com/u/kagamushu)\
**Post date:** [February 11, 2008, 8:23pm UTC](https://forum.kirupa.com/t/gotoandplay-problem/251689/1 "2008-02-11T20:23:34Z")

</div>

Hello,  
i have a stop on my timeline at frame 20. My button (equip) has the command to play the timeline from frame 20 on which works. I would like however for the timeine to play only the next 5 frames and then skip to frame 41, can’t figure it out. Here is my current code:

function goForward(event:MouseEvent):void  
{  
gotoAndPlay(equip.currentFrame + 21);

thanks
