Problem with reading object # in Array

Hello,

I’ve written some php (w/ help from hans and some others, thanks!) and loaded it into to flash to make a list of images to read into a photo gallery. Then I wrote the function in order to be able to change images:


function changeSlide(number) {
	if (number>=0 && number<images.length-1) {
		currentSlide = number;
		loadMovie(images[number], "_root.placeholder");
	}
}

The length-1 part has to do with an extra string once the php is split, so dont worry. The images change on clicking buttons, which have the following codes:

forward


on(release){
	changeSlide(_root.currentSlide + 1);
}

back


on(release){
	changeSlide(_root.currentSlide - 1);
}

I am making an image count (ex. 1 of 12) or (ex. currentslide of total).
Now, the problem is. I’ve figured out how to dynamically make flash figure out how many image filenames were loaded (total):


total.text = images.length-1;

but I can’t figure out how to load the number slide it is on into a dynamic text field. This, for example, outputs [type Function] into the textfield:


slidenum.text = number;

I tried a few things but basically I’m stuck. Any help or advice is extremely appreciated. I tried searching believe me its my last resort to actually post. If anyone needs more info about this to clarify, tell me I’ll post it.

Thanks in advance!