PDA

View Full Version : DD: Autumn Leaves question



devin
10-04-2005, 08:15 PM
DD Autumn Leaves
http://www.dynamicdrive.com/dynamicindex3/leaves.htm

Is there a way to make this turn itself off after a set amout of time?

thanks
Devin

jscheuer1
10-04-2005, 08:45 PM
The modified script here (http://home.comcast.net/~jscheuer1/side/leaves.html) is just about what you need, just add this line:


setTimeout("stop_leaves();", 1000)

after this one at the end of the script:


fall()
1000 is the number of milliseconds the effect will last.

And, get rid of this line:


document.getElementById('stpbut').value='Start Leaves';

and this button:


<form>
<input id="stpbut" type="button" value="Stop Leaves" onClick="stop_leaves();">
</form>

Oh, you can get rid of this bit too:


if (parent.location.href==location.href)
document.write(parent.location.href)
if(-1 != document.URL.indexOf('leaves'))
document.write('<br>'+document.URL)

and this:


onload="if(window.parent.resize){window.parent.resize('fred',100,450,500)}"

from the body tag.

devin
10-05-2005, 03:51 PM
Thanks I'll give that a try! :D

Devin