# Photogallery

**URL:** <https://forum.kirupa.com/t/photogallery/25962>\
**Category:** Uncategorized\
**Created:** [July 18, 2003, 1:30am UTC](https://forum.kirupa.com/t/photogallery/25962 "2003-07-18T01:30:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jp182](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@jp182](https://forum.kirupa.com/u/jp182)\
**Post date:** [July 18, 2003, 1:30am UTC](https://forum.kirupa.com/t/photogallery/25962/1 "2003-07-18T01:30:40Z")

</div>

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?/

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 3:02am UTC](https://forum.kirupa.com/t/photogallery/25962/2 "2003-07-18T03:02:10Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 4:06am UTC](https://forum.kirupa.com/t/photogallery/25962/3 "2003-07-18T04:06:57Z")

</div>

thanks man!  
EXACTLY what i wanted 😃

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 4:13am UTC](https://forum.kirupa.com/t/photogallery/25962/4 "2003-07-18T04:13:07Z")

</div>

No problem. Glad I could help. :beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 10:32pm UTC](https://forum.kirupa.com/t/photogallery/25962/5 "2003-07-18T22:32:16Z")

</div>

now what about this  
[http://www.mocha-pages.com/trendy/gallery.html](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](http://www.mocha-pages.com/trendy/images/gallery.fla)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 18, 2003, 11:26pm UTC](https://forum.kirupa.com/t/photogallery/25962/6 "2003-07-18T23:26:31Z")

</div>

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/”. :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:43am UTC](https://forum.kirupa.com/t/photogallery/25962/7 "2003-07-19T04:43:45Z")

</div>

:-\

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

thanks dude you are a saint:pope:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:45am UTC](https://forum.kirupa.com/t/photogallery/25962/8 "2003-07-19T04:45:47Z")

</div>

You’re welcome. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:48am UTC](https://forum.kirupa.com/t/photogallery/25962/9 "2003-07-19T04:48:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:49am UTC](https://forum.kirupa.com/t/photogallery/25962/10 "2003-07-19T04:49:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 19, 2003, 4:53am UTC](https://forum.kirupa.com/t/photogallery/25962/11 "2003-07-19T04:53:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 20, 2003, 1:47pm UTC](https://forum.kirupa.com/t/photogallery/25962/12 "2003-07-20T13:47:32Z")

</div>

yeah I thought they could be separated:trout:
