countdown clock

  • zenguitarankh
  • Born
  • Born
  • zenguitarankh
  • Posts: 3
  • Loc: Erie PA

Post 3+ Months Ago

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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • lostinbeta
  • Guru
  • Guru
  • User avatar
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

Here's a spot to start..

http://www.kirupa.com/developer/mx/countdown.htm
  • zenguitarankh
  • Born
  • Born
  • zenguitarankh
  • Posts: 3
  • Loc: Erie PA

Post 3+ Months Ago

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
  • Posts: 1402
  • Loc: Philadelphia, PA

Post 3+ Months Ago

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
  • zenguitarankh
  • Posts: 3
  • Loc: Erie PA

Post 3+ Months Ago

Thanks man!!!

I appreciate it!!! \m/

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 9 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.