# Cycle through an Array 4 at a time

**URL:** <https://forum.kirupa.com/t/cycle-through-an-array-4-at-a-time/230983>\
**Category:** flash\
**Created:** [June 30, 2007, 8:19pm UTC](https://forum.kirupa.com/t/cycle-through-an-array-4-at-a-time/230983 "2007-06-30T20:19:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amiridon](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Amiridon](https://forum.kirupa.com/u/Amiridon)\
**Post date:** [June 30, 2007, 8:19pm UTC](https://forum.kirupa.com/t/cycle-through-an-array-4-at-a-time/230983/1 "2007-06-30T20:19:57Z")

</div>

If I wanted to to cycle through an array that looked like this:

Array(“Red”, “Blue”, “orange”, “green”, “Silver”, “Black”, “Yellow”, “Peach”)

how would my code look if I wanted to only display three at a time. what would the code look like for a next and a previous button to see the next three and the previous three?
