That's not the extent of the modifications for the once only version of this script. The main function has to have the this.once=slides.once code in it (yours must already if it stops on the last), and you must use the sldies.once=1 (or true or something like that in the initialization, again - you must already have that). Or, if you don't have these additional code changes, they are hard coded into your version of the script in some other way. I do recognize it though as one that I authored somewhere in these forums. However, as far as I know, it has never been published even as a semi-official update. If you updated, I think you probably added the once only modifications to the update. The only semi-official update is introduced here:
http://www.dynamicdrive.com/forums/blog.php?b=18
and does not have these modifications, though I'm thinking of adding them.
I've done tons of mods for this and other scripts. Please forgive me if I can't always keep track of each one.
Anyways, all you need to do to get it to return to the first slide and then stop is make some changes to the code you show, here (as highlighted):
Code:
inter_slide.prototype.changeimg=function(bool,nav){
if(this.playing){
this.buttons(false)
this.nextimgidx=(this.keeptrack()<this.imgs.length-1)? this.keeptrack()+1 : 0
if(this.once&&this.nextimgidx==1&&this.goagain&&this.goagain<2){
var but=this.go('gostp'+this.issid)? this.go('gostp'+this.issid) : '';
this.gostop(but);
++this.goagain
return;
}
this.goagain=this.goagain||1;
this.populateslide(this.tempobj, this.nextimgidx)
if(bool)
this.rotateimg()
else{
clearTimeout(this.inprocess)
this.inprocess=setTimeout("iss["+this.issid+"].rotateimg()", this.delay)
}
}
Edit: I've added modifications to the blog update to allow for once only stopping at either the last or first slide
Bookmarks