I’m making a set of buttons from xml…each button is corresponding with a picture in a photogallery…
for (var i:Number = 0; i < intSlideCount; i++) {
var newThumb = this.addChild(new Thumb());
newThumb.x = X + (SPACE * i);
newThumb.y = Y;
newThumb.theNum.text = i + 1;
newThumb.addEventListener(MouseEvent.CLICK, onClick);
}
Here is my onClick listener…
private function onClick(e:MouseEvent):void {
if(slideTimer.running) {
slideTimer.stop();
}
slideLoader = new Loader();
slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
slideLoader.load(new URLRequest(xmlSlideshow..image[????????].@src));
}
i can’t figure out how to get the button to correspond with the correct picture… hence the question marks…please help