Hello,
I´ve used the countdown AS from Kiruba to list a value of days left until 2008.
stop();
currentDate = new Date();
thisYear = currentDate.getFullYear();
eventDate = new Date(thisYear, 11, 30);
eventMillisecs = eventDate.getTime();
counter_8.onEnterFrame = function(){
currentDate = new Date();
currentMillisecs = currentDate.getTime();
this.msecs = eventMillisecs - currentMillisecs;
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.digit = string(this.days);
while (this.digit.length < 5) this.digit = "0" + this.digit;
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);
};
I want to calculate 1580 - (this.digit * 4)
and have a new this.digit value of 1364.