PDA

View Full Version : Trax Countdown



Xarea
28-06-2007, 08:36 AM
Anyone got this?

Ini
28-06-2007, 12:15 PM
Erm.. More inromation may be helpful

Tomm
28-06-2007, 02:58 PM
And "Trax Countdown" is?

today
28-06-2007, 03:36 PM
A countdown system, which countdowns for when you want but uses Trax letters (Y) was on Habbo Homepage :) when trax was first coming out (Y)

Jamesy
28-06-2007, 03:41 PM
<center>
<script language="javascript">
var time = new Date();
var localTime = time.getTime();
var localOffset = time.getTimezoneOffset() * 60000;
var now_UTC = localTime + localOffset;

/* event Date _must_ be UTC */
/* http://timeanddate.com/worldclock/converter.html */
var event = new Date("Friday, 1 June 2007, 15:20:00");

var seconds = Math.floor((event - now_UTC) / 1000);
if (seconds < 0) {
seconds = 0;
}
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;

function getObject(id) {
return document.getElementById(id);
}

function updateTime(){
time = new Date();
localTime = time.getTime();
localOffset = time.getTimezoneOffset() * 60000;
now_UTC = localTime + localOffset;

var out = getObject("countdown_timer");

seconds = Math.floor((event - now_UTC) / 1000);
if (seconds < 0) {
seconds = 0;

out.innerHTML='<a href="/trax"><img border="0" src="http://images.habbohotel.co.uk/c_images/album2304/countdown_whole.gif"/></a>';
} else {

seconds = Math.floor(seconds);
minutes = Math.floor(seconds / 60);
hours = Math.floor(minutes / 60);
days = Math.floor(hours / 24);

/* Days - OK */
out.innerHTML='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(days/100)) + '_G.gif"/>';
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor((days/10)%10)) + '_G.gif"/>';
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(days%10)) + '_G.gif"/>';

out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/aac.gif" />';

/* Hours - OK */
var hourstemp = Math.floor(hours%24);
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(hourstemp/10)) + '_G.gif"/>';
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(hourstemp%10)) + '_G.gif"/>';

out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/aac.gif" />';

/* Minutes - OK */
var minutestemp = Math.floor(minutes%60);
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(minutestemp/10)) + '_G.gif"/>';
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(minutestemp%10)) + '_G.gif"/>';

out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/aac.gif" />';

/* Seconds - OK */
var secondstemp = Math.floor(seconds%60);
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(secondstemp/10)) + '_G.gif"/>';
out.innerHTML+='<img src="http://images.habbohotel.co.uk/c_images/album2007/' + (Math.floor(secondstemp%10)) + '_G.gif"/>';

window.setTimeout("updateTime()",100);

}

}

function preloadImages() {
var d = document;
if(d.images) {
if (!d.p_images) {
d.p_images = new Array();
}
var i, j = d.p_images.length, a = preloadImages.arguments;
for (i=0; i < a.length; i++) {
if (a[i].indexOf("#") != 0) {
d.p_images[j] = new Image();
d.p_images[j++].src = a[i];
}
}
}
}


preloadImages("http://images.habbohotel.co.uk/c_images/album2007/aac.gif","http://images.habbohotel.co.uk/c_images/album2007/0_G.gif","http://images.habbohotel.co.uk/c_images/album2007/1_G.gif","http://images.habbohotel.co.uk/c_images/album2007/2_G.gif","http://images.habbohotel.co.uk/c_images/album2007/3_G.gif","http://images.habbohotel.co.uk/c_images/album2007/4_G.gif","http://images.habbohotel.co.uk/c_images/album2007/5_G.gif","http://images.habbohotel.co.uk/c_images/album2007/6_G.gif","http://images.habbohotel.co.uk/c_images/album2007/7_G.gif","http://images.habbohotel.co.uk/c_images/album2007/8_G.gif","http://images.habbohotel.co.uk/c_images/album2007/9_G.gif",
"EndImageHere");
window.setTimeout("updateTime()",100);

</script>

<div id="countdown_timer">&nbsp;</div>

Change the date and the link to your end picture, the picture that displayed when the countdown is over

Want to hide these adverts? Register an account for free!