Countdown Clock in Signature???

KellyJ

O2BNWDW
Joined
Feb 17, 2000
Messages
235
I've seen a few countdown clocks popping up in different signatures and I'd love instructions on how to do this. I'm a techie at heart (currently raising kids) and I'd be more interested in knowing how to do this myself rather than having someone create one for me. Is it possible to get instructions???

Thanks,

Kelly
 
Stu on the UK site has a pretty good explination for the Java version.

Here

I can explain how to do it in Flash if you have Flash 5.

JC
 
JC, Thanks so much! I have some background with Java and appreciate the link! As well as the quick reply. I also have Flash 5 and would love those instructions as well. Thanks so much!!

Kelly
 
How familiar are you with Action Scripting?

Frame 1 of Layer 1 needs to contain the date functions. Frame 2 of layer 1 will goto and play frame 1 unless "then" is < "now" (this allows for 2 seperate states showing 1) the continuing countdown or 2) the I'm there state (in frame 3 of layer 1)

Other layers will contain the graphics and output text boxes.

The countdown to date will be controled by the "then" var.

Some of the stuff at the end is more for apperence sake rather than functionality, but I like it in there. This does not include the "months" code, but it's just as easy. I can post that as well if you want it too.


now = new Date();
then = new Date(2001, 10, 12, 11, 59, 59);
days = (then-now)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (then-now)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (then-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (then-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
if (daysRound == 1) {
dy = " Day ";
} else {
dy = " Days ";
}
if (then<now) {
gotoAndStop (3);
}
if (minutesRound<10) {
minutesRound = "0"+minutesRound;
}
if (secondsRound<10) {
secondsRound = "0"+secondsRound;
}
outday = daysRound+dy;
outtime = hoursRound+":"+minutesRound+":"+secondsRound;



Once you have a basic understanding of this part, you need an "output" dynamic text box for each seperate date type occurence named for each field you want to display (duplicates in seperare layers if you want them shadowed).

(optional)---->In that text box, you can embed whatever font characters are needed for the particular text that you want to show. If you don't embed it, and the user does not have that particular font installed, they will see a default "system" font that may goof up the display layout (and will look sloppy to boot just like the java version).

There is a great number of options that you can throw at this end product with seperate scripting such as fades and movement, but you will still be limited by the clipart guidelines for whatever you do. Don't forget to optimize any images that you use BEFORE you import them to save on the final .swf file size.

I don't think that I forgot anything. Let me know if you have any questions or if you want me to de-bug anything with you.
 

Wow JC, THANKS!! My programming abilities have been getting rusty and this is just what I need! Now if my darling little rugrats will just let Mommy play for a while!:) :)

Thanks again!
Kelly
 















Receive up to $1,000 in Onboard Credit and a Gift Basket!
That’s right — when you book your Disney Cruise with Dreams Unlimited Travel, you’ll receive incredible shipboard credits to spend during your vacation!
CLICK HERE








New Posts







DIS Facebook DIS youtube DIS Instagram DIS Pinterest DIS Tiktok DIS Twitter

Back
Top