# Refresh/reniew

**URL:** <https://forum.kirupa.com/t/refresh-reniew/209581>\
**Category:** Uncategorized\
**Created:** [December 10, 2006, 2:47pm UTC](https://forum.kirupa.com/t/refresh-reniew/209581 "2006-12-10T14:47:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![audrius\_05](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@audrius\_05](https://forum.kirupa.com/u/audrius_05)\
**Post date:** [December 10, 2006, 2:47pm UTC](https://forum.kirupa.com/t/refresh-reniew/209581/1 "2006-12-10T14:47:22Z")

</div>

hey all quick question I have a project where based on a time/ am or pm a message appears ‘good morning, good afternoon, etc’ the problem that I have how do I keep this constantly refreshed? right now when I start application let’s just say a ‘Good Morning’ message appears if I don’t close my application for all day this message will not change unless I close it and re-open it. What I need is to add a code that keeps updating or something. Also this is not a webpage project so refresh my page won’t work, I am implimenting this into an application/software.

this is what I have:

```auto
var myDate = new Date();
var hour = myDate.getHours();
if (hour < 12) {
   this.gotoAndStop(2); // morning
}
else if (hour < 12+6) {
   this.gotoAndStop(3); // afternoon
}
else {
   this.gotoAndStop(4); // evening
}

```
