Couldn’t get the hyperlinks (based on kirupa’s hyperlink slideshow’s link load, link function and xml paths: http://www.kirupa.com/forum/showthread.php?t=81020&highlight=slide+show to work with awesome Scotty’s crossfade slideshow, http://www.kirupa.com/forum/showthread.php?t=212112&highlight=cross+fade , to work. Anyboyd have any luck with it or a suggestion:
var id, current;
var k = 0, p = 0;
var slide = 1;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
link* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
}
id = setInterval(preloadPic, 100);
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
function preloadPic() {
clearInterval(id);
var con = picture.duplicateMovieClip("con"+k, 9984+k);
con.loadMovie(image[p]);
preloader._visible = true;
con._alpha = 0;
var temp = _root.createEmptyMovieClip("temp"+k, 99+k);
k++;
temp.onEnterFrame = function() {
var total = con.getBytesTotal();
var loaded = con.getBytesLoaded();
percent = Math.round(loaded/total*100);
preloader.preload_bar._xscale = percent;
if (con._width) {
preloader._visible = false;
con.onEnterFrame = fadeIn;
if (slide) {
id = setInterval(nextImage, 5000);
}
delete this.onEnterFrame;
}
};
}
MovieClip.prototype.fadeIn = function() {
if (this._alpha<100) {
current._alpha -= 10;
this._alpha += 10;
} else {
current._visible = 0;
current = this;
delete this.onEnterFrame;
}
picture.onRelease = function() {
getURL(link[p], "_blank");
};
};
function nextImage() {
p<total-1 ? p++ : p=0;
preloadPic();
}
function picture_num() {
current_pos = p+1;
}
preloadPic();
xml file:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/kresge.jpg</image>
<link>http://www.yahoo.com</link>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/medialab.jpg</image>
<link>http://www.yahoo.com</link>
</pic>
<pic>
<image>http://www.kirupa.com/developer/mx2004/pg/stata.jpg</image>
<link>http://www.yahoo.com</link>
</pic>
</images>