Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 09-08-2005, 09:54 AM   #1
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
Smile I need a countdown code

I need a countdown code like http://www.origenxbox360.com/ has... No, it doesn't need a picture, or need to look like it.... plain font is fine, I just need a code.

Weither its Flash, PHP, Javascript, whatever... I just want an active countdown.

And it needs to be from year down to the second.




Thanks.
mysterio2099 is offline   Reply With Quote
Old 09-08-2005, 10:31 AM   #2
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Flash would probably be your best option. I found this one that includes the source files which would allow you to edit it. Plenty of other countdown scripts over at Hotscripts
__________________

Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row
mairving is offline   Reply With Quote
Old 09-08-2005, 10:48 AM   #3
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
Thanks a lot mairving. I used the one you found and with a few tweeks, including changing the language of variable names from Spanish to English, it worked great.
mysterio2099 is offline   Reply With Quote
Old 09-08-2005, 10:57 AM   #4
Banned
 
mysterio2099's Avatar
 
Join Date: Aug 2003
Posts: 349
Send a message via AIM to mysterio2099 Send a message via MSN to mysterio2099 Send a message via Yahoo to mysterio2099
...one other thing... using this code:

PHP Code:
var year 2005;
var 
month 11;
var 
day 1;
var 
data1 = new Date(yearmonth-1day);
function 
MyBday() {
    
data2 = new Date();
    
difSec Math.floor((data1-data2)/1000);
    
sec difSec%60;
    
difMin Math.floor(difSec/60);
    
min difMin%60;
    
difHours Math.floor(difMin/60);
    
hours difHours%24;
    
days Math.floor(difHours/24);
    if (
sec<10) {
        
sec "0"+sec;
    }
    if (
min<10) {
        
min "0"+min;
    }
    if (
hours<10) {
        
hours "0"+hours;
    }
    
TheDate days+"."+hours+"."+min+"."+sec;

How would I make it "if time equals zero, go to frame 2"... as in, when the countdown ends, it jumps to frame 2, or frame whatever...

I was thinking about adding

PHP Code:
if (TheDate == 0) {
       
gotoAndPlay(2);
       } 
after

PHP Code:
TheDate days+"."+hours+"."+min+"."+sec
would that do it?

Thanks.

Last edited by mysterio2099; 09-08-2005 at 11:01 AM.
mysterio2099 is offline   Reply With Quote
Old 09-08-2005, 11:14 AM   #5
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
Should work as long as it is inside the function.
mairving is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:57 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2