# Time variable

**URL:** <https://forum.kirupa.com/t/time-variable/168377>\
**Category:** Uncategorized\
**Created:** [November 6, 2005, 6:30pm UTC](https://forum.kirupa.com/t/time-variable/168377 "2005-11-06T18:30:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Um\_Design](https://avatars.discourse-cdn.com/v4/letter/u/ecb155/32.png) [@Um\_Design](https://forum.kirupa.com/u/Um_Design)\
**Post date:** [November 6, 2005, 6:30pm UTC](https://forum.kirupa.com/t/time-variable/168377/1 "2005-11-06T18:30:51Z")

</div>

I hava made time and this is the code of first frame:

```auto
time=new Date(); // time object
var minutes = time.getMinutes()  
var hours = time.getHours()  
if (hours<10)  	
{  	
hours = "0" + hours;  	
}  
if (minutes<10)  	
{  	
minutes = "0" + minutes;  	
}  
clock_txt.text = hours + ":" + minutes  

```

and in a second frame I have insert

```auto
gotoAndPlay(1);

```

Everything function normal and perfect.

Now, I have made more complex thing, so I don’t need to be back on the first frame, becuae then my “project” doesn’t work norma and good.

Now, question is, how to refresh time?

When I start my project, time is always show in the minute that I have start it. After that the time is always the same.  
How to refresh it, where and which code do I have to insert that my time shows properly.  
Thaks in advance
