Click to See Complete Forum and Search --> : timed page load after animation


HTMLmaniac
04-24-2003, 09:31 AM
how do i do a timed page load once an animation is complete? like i mean...how do i make it so once an animation (such as flash or an animated gif) is done..it automatically goes to another link?

Jona
04-24-2003, 10:05 AM
This is more Javascript than HTML, really....

<html><head>
<script>
var exit = setTimeout("leave()", 9000); //number of milliseconds, 1000 = 1 second. Set this to the appropriate time for your animation's ending

function leave(){
location="my_new_page.html";
}
</script></head><body>
<img src="my_ani.gif">
</body></html>

This will work for a 9 second long GIF animation.

HTMLmaniac
04-24-2003, 10:39 AM
tho i know this is javascript...what about for flash animation? and i can make it longer than 9 seconds can't i?

Jona
04-24-2003, 10:48 AM
In Flash you can use ActionScript to call the URL of a function... getURL(){ url = "javascript:doFunction();";}

Anyways, just change that 9000 up at the top. It it's 5 minutes, use 600000*5; if it's just one minute, use 600000. 1000 = 1 second. 60000 = 6 seconds.