Photogallery

On the photogallery on this site, does anyone know how to make it so that when you hit the last image in the array, it will only let you go back and not forward.

For example:
there are 3 images (a, b and c)

once the person is on C, clicking next will not do anything.

Any ideas?/

Instead of this code:
[AS]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;
};[/AS]
You use this one:
[AS]MovieClip.prototype.changePhoto = function(d) {
this.pIndex = Math.min(Math.max(0, this.pIndex+d), this.pArray.length-1);
this.onEnterFrame = fadeOut;
};[/AS]

thanks man!
EXACTLY what i wanted :smiley:

No problem. Glad I could help. :beam:

now what about this
http://www.mocha-pages.com/trendy/gallery.html

for some reason the images won’t load for this
here’s the flash file:
http://www.mocha-pages.com/trendy/images/gallery.fla

The path to the JPEG’s is wrong…

In the code you’ve specified the directory “portofolio/”, but the images are in this directory: “images/portfolio/”. :-\

:-\

wow i’m not off to a good start am i :-\

thanks dude you are a saint:pope:

You’re welcome. :stuck_out_tongue:

actually no that wasn’t it
it turned out that the swf file and the html file had to be in the same directory
who knew

hehe
check it out it works now
http://www.mocha-pages.com/trendy/gallery.html

Uhmm… I didn’t check that, I just assumed that both HTML and SWF were in the same directory. :stuck_out_tongue:

yeah I thought they could be separated:trout: