Click to See Complete Forum and Search --> : Thumbnail gallery prob


stylefrog
01-12-2003, 04:35 PM
Hi.

Right here's my problem:

I want to create a thumbnail viewer exactly like http://www.campbellmithun.com/work/default.asp. So far I've got a single image changing back and forth, but I want the page to show three images and move them one by one (as on Campbellmithun). Here's my current code:

<Script language=JavaScript>
<!--
Urls = new Array("0.gif","1.gif","2.gif","3.gif", "4.gif","5.gif","6.gif","7.gif","8.gif","9.gif","10.gif")
P = 0
Counter = Urls.length - 1
function Previous() {
if (P == 0)
{document.Sliding.src=Urls[9];P=10}
if (P > 0){/*Here P ( 10.gif doesn't exist ) is = 10 */P--;
document.Sliding.src=Urls[P/* Here P is = 9 */]}}
function Next() {
if (P < Counter)
{P++;document.Sliding.src=Urls[P]
if (P == 10)
{document.Sliding.src=Urls[0];P=0} }}
//-->
</Script>

- Call it

<img src="0.gif" name="Sliding" alt="Slideshow">
<a href="javascript:Previous()"><br>Previous</a> <a href="javascript:Next()">Next</a>


Any help you guys can give would be greatly appreciated!!!!

Many thanks
Matt Faulkner

AdamBrill
01-12-2003, 11:45 PM
Try taking a look at the attached code. I think that is what you want. Let me know...

khalidali63
01-13-2003, 02:52 AM
I bet you wanna take a look at this.
:-)

Khalid

stylefrog
01-13-2003, 03:24 AM
Many thanks guys - I usually try and avoid JS where possible but am gradually coming around to the idea! Essentailly I'm a Flash designer who makes things look pretty - if I can be any help to you then just shout! www.stylefrog.net

M

stylefrog
01-14-2003, 09:02 AM
Hi Guys,

just one more question....

I want each image to link to a specific url - obviously moving along as the image moves.

Again your help is really very much appreciated!

M

khalidali63
01-14-2003, 09:53 AM
Attached is the updated version of the code I attached earlier for you.

Khalid