Hiya,
I’m working on a flash module that basically needs to offer the ability for the user to scroll through a series of thumbnails in a carousel format. I currently have the following code which is creating my thumbails horizontally which is all working fine.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xml:XML = new XML();
xml.ignoreWhite=true;
var rad = -40;
container.setMask(masker);
var arLinks:Array = new Array();
xml.load("slider.xml");
xml.onLoad = function(success) {
if (success) {
var DVD = xml.firstChild.childNodes;
for (i=0; i < DVD.length; i++) {
rad = rad + 100;
_global.thumb = DVD*.childNodes[1].childNodes;
link = DVD*.childNodes[2].childNodes;
arLinks.push(link);
var mc:MovieClip = container.attachMovie("thumb", "thumb" + *, container.getNextHighestDepth());
mc.holder.loadMovie(_global.thumb);
mc._y = 65;
mc._x = rad;
mc.id = i;
mc.onRelease = function(){
FLVplay.loadMovie(arLinks[this.id]);
//trace(arLinks[this.id]);
}
}
_global.total = DVD.length ;
trace(_global.total);
}
}
Either side of my container I have ‘forward’ and ‘back’ buttons which I need to be able to scroll through my series of thumbnails in relevent order. I.e, if the ‘back’ button is pressed when first loaded, the container moves to the right to display the last thumbnail, and if the ‘forward’ button is pressed, the container moves left to display the next thumbnail in that order.
So, essentially I guess i’m trying to create a 2D Carousel?
I’m not quite sure how I can go about achieving this? Any help with this would be very gratefully received.
Tom