# Slideshow: Want to create numbered links to each image

**URL:** <https://forum.kirupa.com/t/slideshow-want-to-create-numbered-links-to-each-image/228562>\
**Category:** flash\
**Created:** [June 8, 2007, 9:52pm UTC](https://forum.kirupa.com/t/slideshow-want-to-create-numbered-links-to-each-image/228562 "2007-06-08T21:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Mark](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@John\_Mark](https://forum.kirupa.com/u/John_Mark)\
**Post date:** [June 8, 2007, 9:52pm UTC](https://forum.kirupa.com/t/slideshow-want-to-create-numbered-links-to-each-image/228562/1 "2007-06-08T21:52:32Z")

</div>

Slideshow Question:  
I’ve downloaded Kirupa’s Slideshow tutorial and think it works great. I’m asking for help to create custom links to each image in the slideshow so that I can skip forward to a specific image or backward to revisit an image already previewed. I’ve included an attatchment that shows how I want to treat it.

Recap: I have several links on my homepage that are links to separate photo slideshows. Once I enter a slideshow it starts to cycle through the images. I want the flexibility to skip forward in my slideshow or backward to A SPECIFIC, NUMBERED, image in a sequence of numbered images. Is this a quick code solution?

I’ve considered using the ‘add thumbnails’ tutorial as a hack to create this but don’t really want to create images for each number and I really don’t need the ‘scroller’ functionality.

I’ve searched through many threads and can’t figure out how I should approach this.  
Any help would be greatly appreciated!

Here’s the code I’m working with (thanks to Kirupa):

> 

delay = 3000;  
//-----------------------  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
image = ;  
description = ;  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
description\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
}  
firstImage();  
} else {  
content = “file not loaded!”;  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”);  
/////////////////////////////////////  
listen = new Object();  
listen.onKeyDown = function() {  
if (Key.getCode() == Key.LEFT) {  
prevImage();  
} else if (Key.getCode() == Key.RIGHT) {  
nextImage();  
}  
};  
p = 0;  
this.onEnterFrame = function() {  
filesize = picture.getBytesTotal();  
loaded = picture.getBytesLoaded();  
preloader.\_visible = true;  
if (loaded != filesize) {  
preloader.preload\_bar.\_xscale = 100\*loaded/filesize;  
} else {  
preloader.\_visible = false;  
if (picture.\_alpha\<100) {  
picture.\_alpha += 10;  
}  
}  
};  
function nextImage() {  
if (p\<(total-1)) {  
p++;  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
picture\_num();  
slideshow();  
}  
}  
}  
function prevImage() {  
if (p\>0) {  
p–;  
picture.\_alpha = 0;  
picture.loadMovie(image[p], 1);  
desc\_txt.text = description[p];  
picture\_num();  
}  
}  
function firstImage() {  
if (loaded == filesize) {  
picture.\_alpha = 0;  
picture.loadMovie(image[0], 1);  
desc\_txt.text = description[0];  
picture\_num();  
slideshow();  
}  
}  
function picture\_num() {  
current\_pos = p+1;  
pos\_txt.text = current\_pos+" / "+total;  
}  
function slideshow() {  
myInterval = setInterval(pause\_slideshow, delay);  
function pause\_slideshow() {  
clearInterval(myInterval);  
if (p == (total-1)) {  
p = 0;  
firstImage();  
} else {  
nextImage();  
}  
}  
}
