# Countdown trouble

**URL:** <https://forum.kirupa.com/t/countdown-trouble/240979>\
**Category:** Uncategorized\
**Created:** [October 9, 2007, 3:13am UTC](https://forum.kirupa.com/t/countdown-trouble/240979 "2007-10-09T03:13:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablosci](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pablosci/32/1321_2.png) [@pablosci](https://forum.kirupa.com/u/pablosci)\
**Post date:** [October 9, 2007, 3:13am UTC](https://forum.kirupa.com/t/countdown-trouble/240979/1 "2007-10-09T03:13:17Z")

</div>

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)

```auto
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);

```
