countdown clock

  • zenguitarankh
  • Born
  • Born
  • No Avatar
  • Joined: Jul 09, 2005
  • Posts: 3
  • Loc: Erie PA
  • Status: Offline

Post July 9th, 2005, 2:44 pm

I'm trying to make a countdown clock in flash mx04 that advances the browser from the initial splash page to the main page after X amount of time after playing the animation. I'd show what I have so far, but am not sure where to start. But I know there's going to be a getURL in there somewhere :)

Any help would be awesome...thanks!!!!

-Luc
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 9th, 2005, 2:44 pm

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 9th, 2005, 3:44 pm

Here's a spot to start..

http://www.kirupa.com/developer/mx/countdown.htm
  • zenguitarankh
  • Born
  • Born
  • No Avatar
  • Joined: Jul 09, 2005
  • Posts: 3
  • Loc: Erie PA
  • Status: Offline

Post July 9th, 2005, 5:36 pm

Cool thanks!!!

What I need is even simpler than that....I just need code that will redirect to another page after X seconds. Nothing visual :)

-Luc
  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Joined: Jun 26, 2003
  • Posts: 1402
  • Loc: Philadelphia, PA
  • Status: Offline

Post July 9th, 2005, 6:45 pm

Oh... well that's easy enough.

Code: [ Select ]
var seconds = 3;
function countdown() {
    if (seconds>0) {
        seconds--;
    } else {
        clearInterval(startCountDown);
        getURL("myFile.html");
    }
}
startCountDown = setInterval(countdown, 1000);
  1. var seconds = 3;
  2. function countdown() {
  3.     if (seconds>0) {
  4.         seconds--;
  5.     } else {
  6.         clearInterval(startCountDown);
  7.         getURL("myFile.html");
  8.     }
  9. }
  10. startCountDown = setInterval(countdown, 1000);


Seconds is the number of seconds you want to wait before going to the page and you can change the getURL to whatever you need.

Not sure why you would want such a redirect, but there it is.
  • zenguitarankh
  • Born
  • Born
  • No Avatar
  • Joined: Jul 09, 2005
  • Posts: 3
  • Loc: Erie PA
  • Status: Offline

Post July 9th, 2005, 8:13 pm

Thanks man!!!

I appreciate it!!! \m/

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 34 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.