# Moving to the previous or next image in an array

**URL:** <https://forum.kirupa.com/t/moving-to-the-previous-or-next-image-in-an-array/315107>\
**Category:** Uncategorized\
**Created:** [October 18, 2010, 4:45am UTC](https://forum.kirupa.com/t/moving-to-the-previous-or-next-image-in-an-array/315107 "2010-10-18T04:45:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![el\_charrua](https://avatars.discourse-cdn.com/v4/letter/e/cab0a1/32.png) [@el\_charrua](https://forum.kirupa.com/u/el_charrua)\
**Post date:** [October 18, 2010, 4:45am UTC](https://forum.kirupa.com/t/moving-to-the-previous-or-next-image-in-an-array/315107/1 "2010-10-18T04:45:37Z")

</div>

hey people,

hows things, this is my first post on kirupa. Which i have found to be a great source of information regarding AS3 flash and so much more.

i need HELP!

I’ve set up an array which contains images fro a folder. when you click the thumbnail a larger version of the image with the name appears. I want to be able to click the previous or next button and move through the array eg;

var imgArray:Array = new Array (img1, img2, img3, img4)

if img3 is displayed and you press the previous button it loads img2 same with the next button

and i bet your thinking whatta newbie :crazy:
