Here is a Simple one I know it?

On the following AS how would I load one jpg from the array with a button into a mc holder?


this.pathToPics = “images/”;
// fill this array with your pics
this.pArray = [“01.jpg”, “02.jpg”, “03.jpg”, “04.jpg”, “05.jpg”, “06.jpg”, “07.jpg”, “08.jpg”, “09.jpg”, “10.jpg”, “11.jpg”, “12.jpg”, “13.jpg”, “14.jpg”, “15.jpg”, “16.jpg”, “17.jpg”, “18.jpg”, “19.jpg”, “20.jpg”, “21.jpg”, “22.jpg”, “23.jpg”, “24.jpg”, “25.jpg”, “26.jpg”, “27.jpg”, “28.jpg”, “29.jpg”];
this.fadeSpeed = 20;
this.pIndex = 0;
// MovieClip methods ----------------------------------
// d=direction; should 1 or -1 but can be any number
// loads an image automatically when you run animation
loadMovie(this.pathToPics+this.pArray[0], “_root.holder”);
MovieClip.prototype.changeholder = function(d) {
// make sure pIndex falls within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};
MovieClip.prototype.fadeOut = function() {
if (this.holder._alpha>this.fadeSpeed) {
this.holder._alpha -= this.fadeSpeed;
} else {
this.loadholder();
}
};
MovieClip.prototype.loadholder = function() {
// specify the movieclip to load images into
var p = _root.holder;
// ------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;
};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.holder.getBytesLoaded();
t = this.holder.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.holder._alpha<100-this.fadeSpeed) {
this.holder._alpha += this.fadeSpeed;
} else {
this.holder._alpha = 100;
this.onEnterFrame = null;
}
};
// Actions -----------------------------------------
// these aren’t necessary, just an example implementation
this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changeholder(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changeholder(1);
}
};
Key.addListener(this);