View Full Version : Special Document Effects Stop Button?

03-17-2005, 08:04 PM
SCRIPT: Autumn Leaves

I work for a spouting cleaning company and this is an excellent script for a gutter protection product we make. However the boss has asked if there is a way to create a button a viewer can click on to stop the script and have the leaves not show any more?

I understand they can turn off certain options for their particular browser but as New Zealand is yonks behind everyone else in computer use knowledge - this is not an option - he just wants a one click stop option...

If you can help with a link or scripty bit - you will have my eternal gratitude...


Lisa Wood
Spouting Clean Plus+
Auckland, New Zealand
(who will be linking back for you!)

03-18-2005, 05:58 AM
Others may want to comment, I'm not sure of the syntax for NS prior to NS6, but, here's the mod, works in IE6 and NS7.2:

Change this line in the script:

setTimeout('fall()',20);to this:


add this function:

function stop_leaves(){
for (i=0; i < Amount; i++){
if (ns){
else if (ns6){
}just above the line:

add this button to your page:

<input type="button" value="Stop Leaves" onClick="stop_leaves();">

03-21-2005, 01:34 AM
EXACTLY what I wanted - works like a dream for me here - you are wonderful!! :D

Instructions for us non-java people are clear and idiot proof - great stuff...

Lisa Wood
Spouting Clean Plus+