Photo gallery with text

I was trying to use the photo gallery tutorial from this site the code was done by sbeener I wanted to use the same concept for adding external text for each image. So far I have only been able to figure out how to load the text but I have not figured out how to be able to change the text to correspond to the image. Can someone help me? Please!

Here is the code I was working on:
stop();
photo._width=550;
photo._height=380;

//this is exactly what it said the location of your images
this.pathToPics = “images/”;
this.pathToText = “text/”;

//the file name for the images that will be used
this.pArray = [“image01.jpg”, “image02.jpg”, “image03.jpg”, “image04.jpg”, “image05.jpg”, “image06.jpg”, “image07.jpg”, “image08.jpg”, “image09.jpg”, “image10.jpg”];
this.txtArray = [“text01.txt”, “text02.txt”, “text03.txt”, “text04.txt”, “text05.txt”, “text06.txt”, “text07.txt”, “text08.txt”, “text09.txt”,“text10.txt”];

this.fadeSpeed = 20;
this.pIndex = 0;
this.txtIndex = 0;

loadText = new loadVars();
loadText.load(this.pathToText+this.txtArray[this.txtIndex]);

loadText.onLoad = function(success) {
	if (success) {
		// trace(success);
		artworkText.html = true;
		artworkText.htmlText = this.imageText;
	}
};

// d=direction; should 1 or -1 but can be any number
//loads an image when you run animation
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = function(d) {

// make sure pIndex is within pArray.length
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
	this.pIndex += this.pArray.length;
}

	// make sure txtIndex is within txtArray.length
this.txtIndex = (this.txtIndex+d)%this.txtArray.length;
if (this.txtIndex<0) {
	this.txtIndex += this.txtArray.length;
}

this.onEnterFrame = fadeOut;

};
MovieClip.prototype.fadeOut = function() {
if (this.photo._alpha>this.fadeSpeed) {
this.photo._alpha -= this.fadeSpeed;
} else {
this.loadPhoto();
}
};
MovieClip.prototype.loadPhoto = function() {

// specify the movieclip to load images into
var p = _root.photo;
//------------------------------------------
p._alpha = 0;
p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
this.onEnterFrame = loadMeter;

};
MovieClip.prototype.loadMeter = function() {
var i, l, t;
l = this.photo.getBytesLoaded();
t = this.photo.getBytesTotal();
if (t>0 && t == l) {
this.onEnterFrame = fadeIn;
} else {
trace(l/t);
}
};
MovieClip.prototype.fadeIn = function() {
if (this.photo._alpha<100-this.fadeSpeed) {
this.photo._alpha += this.fadeSpeed;
} else {
this.photo._alpha = 100;
this.onEnterFrame = null;
}
};

this.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
this.changePhoto(-1);
} else if (Key.getCode() == Key.RIGHT) {
this.changePhoto(1);
}
};
Key.addListener(this);

// This is the code on the + button------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

on (release) {
_root.changePhoto(1);
}