# Getting photogallery to stop

**URL:** <https://forum.kirupa.com/t/getting-photogallery-to-stop/96545>\
**Category:** Uncategorized\
**Created:** [December 10, 2003, 6:59pm UTC](https://forum.kirupa.com/t/getting-photogallery-to-stop/96545 "2003-12-10T18:59:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![niki](https://avatars.discourse-cdn.com/v4/letter/n/c57346/32.png) [@niki](https://forum.kirupa.com/u/niki)\
**Post date:** [December 10, 2003, 6:59pm UTC](https://forum.kirupa.com/t/getting-photogallery-to-stop/96545/1 "2003-12-10T18:59:01Z")

</div>

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:
