# 5 steps at one time before pressing button again

**URL:** <https://forum.kirupa.com/t/5-steps-at-one-time-before-pressing-button-again/194623>\
**Category:** flash\
**Created:** [July 25, 2006, 2:17am UTC](https://forum.kirupa.com/t/5-steps-at-one-time-before-pressing-button-again/194623 "2006-07-25T02:17:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![santalea](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@santalea](https://forum.kirupa.com/u/santalea)\
**Post date:** [July 25, 2006, 2:17am UTC](https://forum.kirupa.com/t/5-steps-at-one-time-before-pressing-button-again/194623/1 "2006-07-25T02:17:41Z")

</div>

how do i make so that when i press a button instead of juz moving from point A to B, it will move from point A to B then C then D then E. and then i will click again and it will go 5 more steps and so on…? because i tried to write it as

targetIndex += 5;

but obviously it won’t work coz instead of going thru 2, 3, 4, 5… it jumps straight from 1 to 5… help me some one…:h:
