Getting photogallery to stop

I am LOVING sbeeners photogallery.
Ive been able to customize it into an automatic slideshow (removing the buttons and having it work on a timer)

Following Kode’s instructions from previous posts, Ive switched:

"Instead of this code:

ActionScript:--------------------------------------------------------------------------------MovieClip.prototype.changePhoto = function(d) {
this.pIndex = (this.pIndex+d)%this.pArray.length;
if (this.pIndex<0) {
this.pIndex += this.pArray.length;
}
this.onEnterFrame = fadeOut;
};

You use this one:

ActionScript:--------------------------------------------------------------------------------MovieClip.prototype.changePhoto = function(d) {
this.pIndex = Math.min(Math.max(0, this.pIndex+d), this.pArray.length-1);
this.onEnterFrame = fadeOut;
};
"

NOW all i need to know is how to make it stop on the last frame instead of continually reloading the photo so it doesnt fade in and out in a loop.

Thanks so much for the help - I am so in love with this website and community - you guys make me look so good to my clients

:azn: