# Sever-based Countdown without Images

**URL:** <https://forum.kirupa.com/t/sever-based-countdown-without-images/209373>\
**Category:** flash\
**Created:** [December 8, 2006, 3:37am UTC](https://forum.kirupa.com/t/sever-based-countdown-without-images/209373 "2006-12-08T03:37:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuel503](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@Manuel503](https://forum.kirupa.com/u/Manuel503)\
**Post date:** [December 8, 2006, 3:37am UTC](https://forum.kirupa.com/t/sever-based-countdown-without-images/209373/1 "2006-12-08T03:37:45Z")

</div>

Hi Everybody!!!

I would need help with the following code for a server-based Countdown (see below). I would need this code changed without using images displaying the numbers. Thanks so much for your help in advance.

All my Best,  
Manuel

* * *

stop();  
eventDate = new Date(2007, 7, 1);  
eventMillisecs = eventDate.getTime();  
countdown = function(){  
var currentMillisecs = server.time + getTimer();  
this.msecs = eventMillisecs - currentMillisecs;  
if (this.msecs \<= 0){  
play();  
return;  
}  
this.secs = Math.floor(this.msecs/1000); // 1000 milliseconds make a second  
this.mins = Math.floor(this.secs/60); // 60 seconds make a minute  
this.hours = Math.floor(this.mins/60); // 60 minutes make a hour  
this.days = Math.floor(this.hours/24); // 24 hours make a second

```
this.msecs = string(this.msecs % 1000);
this.secs = string(this.secs % 60);
this.mins = string(this.mins % 60);
this.hours = string(this.hours % 24);
this.days = string(this.days);

while (this.msecs.length &lt; 3) this.msecs = "0" + this.msecs;
if (this.secs.length &lt; 2) this.secs = "0" + this.secs;
if (this.mins.length &lt; 2) this.mins = "0" + this.mins;
if (this.hours.length &lt; 2) this.hours = "0" + this.hours;
while (this.days.length &lt; 3) this.days = "0" + this.days;
for(movie in this){
    if (this[movie]._parent == this) this[movie].evaluateFrameFrom(this);
}

```

};  
MovieClip.prototype.evaluateFrameFrom = function(variableClip){  
var nameArray = this._name.split("_");  
var numberSet = variableClip[nameArray[0]];  
var character = number(nameArray[1]);  
var frame = 1 + number(numberSet.charAt(character));  
if (this.\_currentframe != frame) this.gotoAndStop(frame);  
};  
server = new LoadVars();  
server.onLoad = function(ok){  
if (!ok) return trace(“Sorry. Server error!”);  
counter.onEnterFrame = countdown;  
counter.\_visible = true;  
this.time = Number(this.time)_1000 - getTimer();  
};  
server.load(“[http://www.americamakesthemovie.com/gettime.php](http://www.americamakesthemovie.com/gettime.php)”);  
/_ gettime.php:  
\<?php  
echo “time=” . time();  
?\>  
\*/  
counter.\_visible = false;
