[FONT=Times New Roman][SIZE=3]I’m trying to create a more advanced feature where the user rather than clicking on the next and previous button (even though they are there) they can have the option to click on the photo button link to view the photo. I’m stuck on how to create this and not really sure on how to start the script. What I’m trying to do is to adjust the boxes according to the amount of pictures that are being displayed; so if I were to display 4 pictures from the xml file, there would be 4 small button links 1,2,3,4 and the user could click on those to view the photos. Hopefully this is not too confusing the way I wrote it up. If it helps I put the file here and listed the script. Really appreciate any help i can get on this. One of the things that I did was create a moviclip and add a linkage property to it called icon. From their I don’t really know how to script the function. Can some help me out with this.[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I attached a link to view what I currently have running: [COLOR=#800080]Slidehow[/COLOR]
This is what the file currently looks like: [COLOR=#0000ff]Slideshow[/COLOR]
[/SIZE][/FONT]
function loadXML(loaded)
{
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i = 0; i < total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "Error";
}
}
_global.xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("image.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
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);
picture_num();
}
} else if (p == (total-1)) {
p = 0;
firstImage();
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
picture_num();
} else if (p<1) {
(p=(total));
}
}
function firstImage()
{
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
picture_num();
}
}
function picture_num() {
current_pos = p+1;
}