2 Replies Latest reply on Dec 7, 2006 11:17 PM by Manu503

    Sever-based Countdown without Images - Code Change....

    Manu503
      Hi Everybody,

      I got this code (see below) for a Server-based Countdown with images. Can somebody help me with editing this code to use simple numbers (no images)... That's so important to me. I've got only this week to get this fixed.

      Thanks so much!!!!
      Regards, Manuel
      >
      > THE CODE:
        • 1. Re: Sever-based Countdown without Images - Code Change....
          Manu503 Level 1
          I tried also the following code.... but I don't want the month in there and it should be server-based.. thanks
          • 2. Re: Sever-based Countdown without Images - Code Change....
            Manu503 Level 1
            I tried to fix my problem and got the following code....(see below) So I put a dynamic textfield (called here displaytxt) and tried to display my values. It's not working. Can anybody tell me, why??? Thanks.


            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);
            this.mins = Math.floor(this.secs/60);
            this.hours = Math.floor(this.mins/60);
            this.days = Math.floor(this.hours/24);
            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 < 3) this.msecs = "0" + this.msecs;
            if (this.secs.length < 2) this.secs = "0" + this.secs;
            if (this.mins.length < 2) this.mins = "0" + this.mins;
            if (this.hours.length < 2) this.hours = "0" + this.hours;
            while (this.days.length < 3) this.days = "0" + this.days;

            displaytxt=this.days+" : "+this.hours+" : "+this.mins+" : "+this.secs+" : "+this.msecs;
            }

            server.load("gettime.php");