Need my gallery to read php file instead of txt file. pls help

Heya! I was hoping someone will help me with my problem… i have posted on this forums trying to change a gallery that reads xml file to one that reads txt files and that also has a preloader and centrally resizes automatically. since i got no replies i tried and finally after a few months managed to get it to read txt files. unfortunately, i have realised that i require the gallery to read data from a php file and not a txt file because i dont have the permissions to create a txt file and edit it on the server. so could anyone help me convert my actionscript so it reads from a php file? here are my codes:


spacing = 10;
//photo._alpha = 0;
pArray = new Array();
loadArray = new LoadVars();
loadArray.load("imageList.txt");
loadArray.onLoad = function(success) {
    if (success) {
        pArray = this.myImages.split(",");
        changePhoto(0);//added this one
    }
};
/*
   i wrote this code, but you can use and abuse it however you like.
   the methods are defined in the order which they occur to make it
   easier to understand.
*/
// variables ------------------------------------------
// put the path to your pics here, include the slashes (ie. "pics/")
// leave it blank if they're in the same directory
this.pathToPics = "animation/";
// fill this array with your pics
//this.pArray = ["image0.jpg", "image1.jpg", "image2.jpg", "image3.jpg", "image4.jpg", "image5.jpg", "image6.jpg", "image7.jpg", "image8.jpg", "image9.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
//photo._alpha = 0;
loadMovie(this.pathToPics+this.pArray[0], _root.photo);
MovieClip.prototype.changePhoto = 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.photo._alpha>this.fadeSpeed) {
		this.photo._alpha -= this.fadeSpeed;
	} else {
		this.loadPhoto();
	}
};
MovieClip.prototype.loadPhoto = function(pic) {
	// 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();
	bar._visible = 1;
	per = Math.round((l/t)*100);
	//if (t>0 && t == l) {
    if (t != 0 && Math.round(l/t) == 1 && this.photo._height != 0) {
			var w = this.photo._width+spacing, h = this.photo._height+spacing;
		this.onEnterFrame = fadeIn;
		border.resizeMe(w, h);
		bar._visible = 0;
	} else {
		bar._width = per;
		trace(l/t);
	}
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
	var speed = 3;
	this.onEnterFrame = function() {
		this._width += (w-this._width)/speed;
		this._height += (h-this._height)/speed;
		nav._x = Math.round(this._x-this._width/2);
		nav._y = Math.round(this._y+this._height+spacing/2);
		//if you want the next and prev button on a solid place, skip next three lines
		if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
			this._width = w;
			this._height = h;
		    photo._x = this._x-this._width/2+spacing/2;
			photo._y = this._y+spacing/2;
			photo._alpha = 100;
			delete this.onEnterFrame;
		}
	};
};
MovieClip.prototype.fadeIn = function() {
	if (this.photo._alpha<100-this.fadeSpeed) {
		this.photo._alpha = 0;
	} else {
		this.photo._alpha = 100;
		this.onEnterFrame = null;
	}
};
// Actions -----------------------------------------
// these aren't necessary, just an example implementation
this.onKeyDown = function() {
	if (Key.getCode() == Key.LEFT) {
		this.changePhoto(-1);
	} else if (Key.getCode() == Key.RIGHT) {
		this.changePhoto(1);
	}
};
Key.addListener(this);

and my text file has this:

myImages=image0.jpg,image1.jpg,image2.jpg,image3.jpg,image4.jpg,image5.jpg,image6.jpg,image7.jpg,image8.jpg,image9.jpg,image10.jpg

hope you can help… i really need this badly and any advice would go a long way.

thanks in advance:beer: