# Going to specific images on a stack - advice needed

**URL:** <https://forum.kirupa.com/t/going-to-specific-images-on-a-stack-advice-needed/310361>\
**Category:** flash\
**Created:** [June 8, 2010, 1:38pm UTC](https://forum.kirupa.com/t/going-to-specific-images-on-a-stack-advice-needed/310361 "2010-06-08T13:38:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbucker](https://avatars.discourse-cdn.com/v4/letter/h/278dde/32.png) [@humbucker](https://forum.kirupa.com/u/humbucker)\
**Post date:** [June 8, 2010, 1:38pm UTC](https://forum.kirupa.com/t/going-to-specific-images-on-a-stack-advice-needed/310361/1 "2010-06-08T13:38:54Z")

</div>

Hi,

I’m currently coding an image stack, (in quick words, when the user click on the top image, this one goes and hides at the end of the stack and displays the one under)

I have the project to add a menu to be able to jump to specific images (the position could be stored on the id of the link or in xml)

Link 1 would take me to image 3  
Link 2 would take me to image 7  
…

My question, (let’s take an example) if I want to access image #5 (right in the middle of a stack of 10 pics) how should I code it the proper way to make disappear the pictures before (if there are some), and place them after the ones currently under the image # 5

Example :

image3  
image4  
image5 \> the one to bring on top  
image…  
image9  
image1  
image2

or

image6  
image7  
image8  
image9  
image…  
image5

I’m having problem trying to figure out how to code this clean.

Thanks a lOT
