hey there
im just driving crazy
i get this acs code that creates a countdown from a date that i can specify
i put four dynamic text box on the stage and i tell that put the countdown info on those boxes
the point is, the data appears, but it never update, its get static, and the debug console shows that the data is updated but i cant generate a update on the stage on those dynamic boxes
any idea?
thanks
(my english definitelly sucks)
Date.prototype.getDifference = function() {
var difference, endDate, retObj, endTime;
endDate = new Date();
endDate.setHours(arguments[0]);
endDate.setMinutes(arguments[1]);
endDate.setSeconds(arguments[2]);
endDate.setFullYear(arguments[3]);
endDate.setMonth(arguments[4]);
endDate.setDate(arguments[5]);
endTime = endDate.getTime();
retObj = new Object();
difference = endTime-this.getTime();
retObj.time = difference;
retObj.days = Math.floor(difference/86400000);
retObj.hours = Math.floor((difference-(retObj.days*86400000))/(3600000));
retObj.minutes = Math.floor((difference-(retObj.days*86400000)-(retObj.hours*3600000))/(60000));
retObj.seconds = Math.floor((difference-(retObj.days*86400000)-(retObj.hours*3600000)-(retObj.minutes*60000))/(1000));
return retObj;
};
blkYear = 2007;
blkMonth = 9;
blkDay = 2;
blkHour = 8;
blkMin = 36;
mydate = new Date(blkYear, blkMonth, blkDay, blkHour, blkMin, 0, 0);
today = new Date();
diff = mydate.getDifference(today.getHours(), today.getMinutes(), today.getSeconds(), today.getFullYear(), today.getMonth(), today.getDate());
trace("this is the value of date");
trace(diff.days+" days");
trace(diff.hours+" hh");
trace(diff.minutes+" mm");
trace(diff.seconds+" ss");
_root.dias.text = (diff.days);
_root.horas.text = (diff.hours);
_root.minu.text = (diff.minutes);
_root.seg.text = (diff.seconds);