Forum index / Computers / Count down

Count down

18 posts · page 1 of 1

post #1
11 April 2005, 22:32 UTC#1
does anyone know how to make a count down like on the warped tour site.

I need to do one for our site, for a big local band show that we are hosting and probably filming.
post #2
11 April 2005, 22:33 UTC#2
no clue dude.
post #3
11 April 2005, 22:34 UTC#3
shhhhhhh-e-at
post #4
11 April 2005, 22:43 UTC#4
I dunno how to do it in flash. Try searching google for a countdown javascript.
post #5
12 April 2005, 02:04 UTC#5
copy and paste the following code where you want the countdown timer, its a basic one, but does its job. I use this on my site for random stuff! change what is nessesary.

<script language="JavaScript1.2">

/*
Dynamic countdown Script- © Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/


function setcountdown(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////

//STEP 1: Configure the countdown-to date, in the format year, month, day:
setcountdown(2005,05,01)

//STEP 2: Change the two text below to reflect the occasion, and message to display on that occasion, respectively
var occasion="The Hunt 3!"
var message_on_occasion="The Hunt 3 Begins!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countdown area
var countdownwidth='480px'
var countdownheight='20px'
var countdownbgcolor='2a2a2a'
var opentags='<font face="Arial"><small>'
var closetags='</small></font>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countdown(){
if (document.layers)
document.countdownnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all?document.getElementById("countdownie") : countdownie
countdown()
}

if (document.all||document.getElementById)
document.write('<span id="countdownie" style="width:'+countdownwidth+'; background-color:'+countdownbgcolor+'"></span>')

window.onload=start_countdown


function countdown(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
futurestring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(futurestring)-Date.parse(todaystring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000))/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1)
//if on day of occasion
if(dday<=0&&dhour<=0&&dmin<=0&&dsec<=1&&todayd==da){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+message_on_occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+message_on_occasion+closetags
return
}
//if passed day of occasion
else if (dday<=-1){
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+"Occasion already passed! "+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+"Occasion already passed! "+closetags
return
}
//else, if not yet
else{
if (document.layers){
document.countdownnsmain.document.countdownnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags)
document.countdownnsmain.document.countdownnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds left until "+occasion+closetags
}
setTimeout("countdown()",1000)
}
</script>

<ilayer id="countdownnsmain" width=&{countdownwidth}; height=&{countdownheight}; bgColor=&{countdownbgcolor}; visibility=hide><layer id="countdownnssub" width=&{countdownwidth}; height=&{countdownheight}; left=0 top=0></layer></ilayer>
post #6
12 April 2005, 02:05 UTC#6
Nice one mate
post #7
12 April 2005, 02:14 UTC#7
no problem, im here to assist biggrin.gif
post #8
12 April 2005, 02:15 UTC#8
yeah I found one of them, f that, ill just change it everyday lol
post #10
12 April 2005, 02:18 UTC#10
I dont get it lol, I tryed to use it.
post #11
12 April 2005, 02:18 UTC#11
which editor are you using?
post #12
12 April 2005, 02:24 UTC#12
website editor, or video?
post #13
12 April 2005, 02:26 UTC#13
website
post #14
12 April 2005, 02:31 UTC#14
I just type everything out man, and the only program I used was the banner, and I used fireworks, and then everything else note pad.
post #15
12 April 2005, 02:35 UTC#15
You do everything in notepad, yet don't know what to do with a little javascript?
post #16
12 April 2005, 02:37 UTC#16
iman amature, but I could figure it out, im just lazy.
post #17
12 April 2005, 02:37 UTC#17
well I isn't quite sure about how to do it in notepad, but I think you just paste the code in the place you want it. and change the fields it tell you to.

if you have a editing program like frontpage or dreamweaver you simply "insert html" in the place u require it.

the settings r easy to change as it is like 5 things, if you still dont no what to change I can modify the code to meet your requirments, then paste you the new code... your choice.

if you take me up on the offer then I will need, the date you are counting down to, what you are counting down to, and the message that you want displayed when it has ended. Also the font type & background colour (in hex).
post #18
12 April 2005, 04:34 UTC#18
no idea