Adding links to photo slideshow

Hi.

Been reading all the tutorials and looking at the forum, but haven’t found an answer to this yet. I want to add links to each of the images loading in a slideshow.

On kirupa’s tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm on thumbnails the example on the site has links on each of the images loaded, but I can’t find where this is referenced to in the tutorial itself or the source files.

There’s a <link> field for each picture in the xml file, but this is not being accessed by the fla file that I have downloaded. How do I do this?

Thanks

this link displays a list of url’s - but is not an xml file as far as i can tell.

i’ve got things working - except that i get the same “undefined” url request somebody else mentioned earlier. any new info up abou tthis?

thanks
zach

Have you sorted it?
Else

Also…(I may be talking nonsense here be warned) if your paths are correct and u get undefined it maybe that you have saved the jpg progressive? I think it doesnt work with progressive or gifs…
If this is not relevant apologies

One thing I was wondering about this, was if there was a way of jumping to the first or last image, if there is then I can use it for my webcomic.

Actually, If someone could help with my above question that would be great, I didn;t want to start a whole new thread, and there are lots on this photo gallery, basically, I want the viewer to be able to click next prev as they currently can and also jump to the first and last, is this possible?

Current code, as per the tute.


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");

previous_btn.onRelease = function() {

prevImage();

};
next_btn.onRelease = function() {

nextImage();

};
first_btn.onRelease = function() {

firstImage();

};
last_btn.onRelease = function() {

lastImage();

};
/////////////////////////////////////
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();

}

}

}
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();

}

}
function picture_num() {

current_pos = p+1;
pos_txt.text = current_pos+" / "+total;

}

(I really struggle with scripting I’ve never been a coder, only an artist/designer and no matter how hard I try I find my brain switching off completely when I try to work out actionscript, I think the left side of my brain is holding the right side hostage, so help is most welcome)

You want a seperate button for that or eg if they click the next_btn when the last image is shown the first image comes up?

scotty(-:

Hi, preferably seperate, so you will have 4 buttons

First (Jump back to start)
prev (Previous Comic)
Next (Next Comic)
Last (Jump to last Comic)

Thanks in advance :smiley:

Name those extra buttons ‘first_btn’ and ‘last_btn’

first_btn.onRelease = function(){
   firstImage();
}
last_btn.onRelease = function(){
p=total-1;
picture._alpha = 0;
picture.loadMovie(image[p]);
desc_txt.text = description[p];
picture_num();
}

scotty(-:

A thousand thanks Mr scotty :slight_smile:

now uploading the comic will be a piece of cake, and the site is only 6kb in size before the external swfs are loaded. So happy days for 56kers.
:beer:

welcome=)