[thelist] javascript to toggle through several images

Adrian Simmons adrinux at ntlworld.com
Wed Aug 11 11:41:21 CDT 2004


hello evolters,

I'm wondering if someone can stop javascript from making my head explode.

I have a site with visual illusions, currently in development, and some 
of the illusions have several states that the visitor can view 
slide-show style by clicking on them.
This works nicely with flash installed:
http://opprints/contours-vase.php

But I'm having problems with the javascript version I send to browsers 
without flash. Switching between two images is easy with toggle:

var imgstate = (toggle)?'off':'on';

And looping through an array for an animated slide-show is easy.

But how would I go about looping through an array one image at a time, a 
mouse click required to move on to the next image each time?

I just can't grasp what to do, and can't seem to find any examples online.


-- 
adrinux (aka Adrian Simmons)
e-mail <mailto:adrinux at ntlworld.com>
AOL or Yahoo Messenger ID: perlucida
Microsoft Messenger ID: adrian at perlucida.com
blog <http://adrinux.perlucida.com>



More information about the thelist mailing list