# Countdown Question 2

**URL:** <https://forum.kirupa.com/t/countdown-question-2/135374>\
**Category:** Uncategorized\
**Created:** [January 26, 2005, 10:44pm UTC](https://forum.kirupa.com/t/countdown-question-2/135374 "2005-01-26T22:44:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpb\_black](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jpb\_black](https://forum.kirupa.com/u/jpb_black)\
**Post date:** [January 26, 2005, 10:44pm UTC](https://forum.kirupa.com/t/countdown-question-2/135374/1 "2005-01-26T22:44:09Z")

</div>

The code that I have works perfect in Flash MX. Can anyone help me make this work in Flash 5? I know that sounds ridiculous, but that is what my boss is requesting. Brainy you were a ton of help yesterday thanks again. Below is the AS that I have currently. Thanks in advance to anyone who can help me.  
stop();

currentDate = new Date();  
thisYear = currentDate.getFullYear();

eventDate = new Date(thisYear, 1, 20);  
eventMillisecs = eventDate.getTime();

counter.onEnterFrame = function(){

currentDate = new Date();  
currentMillisecs = currentDate.getTime();

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;

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);  
};
