# Refresh this function

**URL:** <https://forum.kirupa.com/t/refresh-this-function/223660>\
**Category:** Uncategorized\
**Created:** [April 24, 2007, 6:42pm UTC](https://forum.kirupa.com/t/refresh-this-function/223660 "2007-04-24T18:42:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abramelin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/abramelin/32/3256_2.png) [@abramelin](https://forum.kirupa.com/u/abramelin)\
**Post date:** [April 24, 2007, 6:42pm UTC](https://forum.kirupa.com/t/refresh-this-function/223660/1 "2007-04-24T18:42:56Z")

</div>

here is my code

```auto

MaDate = new Date();
heure = MaDate.getHours();
minute = MaDate.getMinutes();
_root.onEnterFrame = function() {
    divisionminute = minute*0.1;
    with (_root.animation) {
        gotoAndStop((heure*6)+(Math.round(divisionminute))+1);
    }
    if (length(minute) == 1) {
        minute = "0"+minute;
    }
    if (length(heure) == 1) {
        heure = "0"+heure;
    }
};

```

i want flash to refresh this function in every 1 seconds. how can i do that?
