Xml slideshow - jog thumbnail

I have adapted the kirupa xml slideshow tutorial.

However I would like to create a up and down buttons that jog the thumbnails + or - 3 thumb images either way.

Is this a case of creating an on (release) action that tells the slider to advance a specified distance??

Here’s the actionscript:

function loadPhotoXML(filename)
{
PhotoXML.ignoreWhite = true;
PhotoXML.load(filename);
PhotoXML.onLoad = function (success)
{
if (success)
{
PhotoNumber = 0;
RootNode = this.firstChild;
TotalPhotos = RootNode.childNodes.length;
thumbnails = [];
for (i = 0; i < TotalPhotos; i++)
{
thumbnails* = RootNode.childNodes*.childNodes[1].firstChild.nodeValue;
thumbnails_fn(i);
} // end of for
showPhoto(PhotoNumber);
} // end if
};
} // End of the function
function showPhoto(PhotoNum)
{
if (PhotoNum == TotalPhotos - 1)
{
next_btn.enabled = false;
}
else
{
next_btn.enabled = true;
} // end else if
if (PhotoNum == 0)
{
previous_btn.enabled = false;
}
else
{
previous_btn.enabled = true;
} // end else if
if (loaded == filesize)
{
var _loc2 = RootNode.childNodes[PhotoNum].attributes.filename;
var _loc3 = RootNode.childNodes[PhotoNum].firstChild.nodeValue;
empty_mc.loadMovie(“gallery/images/” + _loc2);
caption_txt.text = _loc3;
} // end if
} // End of the function
function nextImage()
{
if (p < TotalPhotos - 1)
{
PhotoNumber = PhotoNumber + 1;
if (loaded == filesize)
{
empty_mc._alpha = 0;
showPhoto(PhotoNumber);
} // end if
} // end if
} // End of the function
function prevImage()
{
PhotoNumber = PhotoNumber - 1;
showPhoto(PhotoNumber);
} // End of the function
function thumbNailScroller()
{
this.createEmptyMovieClip(“tscroller”, 1000);
scroll_speed = 5;
tscroller.onEnterFrame = function ()
{
if (_root._xmouse >= thumbnail_mc._x && _root._xmouse <= thumbnail_mc._x + thumbnail_mc._width)
{
if (_root._ymouse >= hit_right._y - 40 && thumbnail_mc.hitTest(hit_right))
{
thumbnail_mc._y = thumbnail_mc._y - scroll_speed;
}
else if (_root._ymouse <= hit_left._y + 40 && thumbnail_mc.hitTest(hit_left))
{
thumbnail_mc._y = thumbnail_mc._y + scroll_speed;
} // end else if
}
else
{
delete tscroller.onEnterFrame;
} // end else if
};
} // End of the function
function thumbnails_fn(k)
{
thumbnail_mc.createEmptyMovieClip(“t” + k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function (target_mc)
{
target_mc._y = hit_left._y + (
eval(“thumbnail_mc.t” + k)._height + 8) * k;
target_mc.pictureValue = k;
target_mc.onRelease = function ()
{
PhotoNumber = this.pictureValue - 1;
nextImage();
};
target_mc.onRollOver = function ()
{
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function ()
{
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], “thumbnail_mc.t” + k);
} // End of the function
p = 0;
var PhotoXML = new XML();
var PhotoNumber;
var TotalPhotos;
var RootNode;
loadPhotoXML(“images_SS07.xml”);
listen = new Object();
listen.onKeyDown = function ()
{
if (Key.getCode() == 37)
{
prevImage();
}
else if (Key.getCode() == 39)
{
nextImage();
} // end else if
};
this.onEnterFrame = function ()
{
filesize = empty_mc.getBytesTotal();
loaded = empty_mc.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize)
{
preloader.preload_bar._xscale = 100 * loaded / filesize;
}
else
{
preloader._visible = false;
if (empty_mc._alpha < 100)
{
empty_mc._alpha = empty_mc._alpha + 10;
} // end if
} // end else if
};
Key.addListener(listen);
previous_btn.onRelease = function ()
{
prevImage();
};
next_btn.onRelease = function ()
{
nextImage();
};


Help much appreciated

:hugegrin: