View Full Version : :: help with adding to this script plz?! ::
babelfish
10-30-2002, 09:29 AM
Hi all... i have a page that dynamically produces a list of webcam images:
http://www.simonsgroup.com/ftp/relay.nsf/picsshowthistle
(ignore the dates as the server isnt replicating properly atm)
main problem is that i have got a script from DD that cycles thru the images available - now, this works fine but i need a way to stop it - any ideas? - eg stop the cycle?
the cycling is created by this page:
http://www.simonsgroup.com/ftp/relay.nsf/slideshow1Thistle.js
thanks all!
If you simply want a radio button that effects a pause -
<td><input type="radio" name="connSpeed" value="pause" onclick="speed(Math.pow(22,22))">Pause</td>
would give you 3.4e+29 milliseconds (a few years I guess).
If you want to stop the slideshow at the end, you would want to play with the line
curimageindex=(curimageindex<fadeimages.length-1)? curimageindex+1 : 0
perhaps...
if (curimage=(fadeimages.length-1)) {speed(Math.pow(22,22));}
Note: I couldn't really be bothered to overly explore the code so used that workaround instead. Perhaps someone else will actually pick it apart and show the 'proper' way.
babelfish
10-30-2002, 10:19 AM
cheers - i will look into that once the server is finished repairing - if u try to reach this page u MIGHT have probs for 10 mins or so..
BUT i think i tried making a vast pause button before - problem was that the cycyle needs to end before u can unpause...
so u have to wait that x thousand seconds before u can restart it..
actually i should have said i need to PAUSE the cycyle more than stop it..
babelfish
10-30-2002, 12:41 PM
i tried the speed(Math.pow(22,22)) thingy and it goes uber fast :eek: any ideas? i have also tried value=massive number and that just kills the unpause thing i mentioned b4
babelfish
10-31-2002, 08:43 AM
bump
Roy Sinclair
10-31-2002, 02:49 PM
Have you looked at the built in setTimeout function? It's whole purpose is to call a function after a number of milliseconds.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.