jp182
July 18, 2003, 1:30am
1
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?/
system
July 18, 2003, 3:02am
2
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]
system
July 18, 2003, 4:06am
3
thanks man!
EXACTLY what i wanted
system
July 18, 2003, 4:13am
4
No problem. Glad I could help. :beam:
system
July 18, 2003, 10:32pm
5
system
July 18, 2003, 11:26pm
6
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/”. :-\
system
July 19, 2003, 4:43am
7
:-\
wow i’m not off to a good start am i :-\
thanks dude you are a saint:pope:
system
July 19, 2003, 4:48am
9
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
system
July 19, 2003, 4:49am
10
system
July 19, 2003, 4:53am
11
Uhmm… I didn’t check that, I just assumed that both HTML and SWF were in the same directory.
system
July 20, 2003, 1:47pm
12
yeah I thought they could be separated:trout: