# Writing a Actionscript for Time

**URL:** <https://forum.kirupa.com/t/writing-a-actionscript-for-time/14699>\
**Category:** flash\
**Created:** [March 1, 2003, 5:26pm UTC](https://forum.kirupa.com/t/writing-a-actionscript-for-time/14699 "2003-03-01T17:26:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JustOnePix](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@JustOnePix](https://forum.kirupa.com/u/JustOnePix)\
**Post date:** [March 1, 2003, 5:26pm UTC](https://forum.kirupa.com/t/writing-a-actionscript-for-time/14699/1 "2003-03-01T17:26:48Z")

</div>

Hey. How would I go about writing code to make a dynamic textfield display the time showing the seconds as they increment and change the minutes/hours dynamically?

The way I know will show the time, but will only change if you refresh the .SWF or go back to the scene with the textfield.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 1, 2003, 5:35pm UTC](https://forum.kirupa.com/t/writing-a-actionscript-for-time/14699/2 "2003-03-01T17:35:43Z")

</div>

using whatever way you show time, just do it over and over again so it refreshes constantly. The way to do this is by adding it to an enter frame event. Since its running every frame, if the time changes, it will be updated.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 1, 2003, 5:47pm UTC](https://forum.kirupa.com/t/writing-a-actionscript-for-time/14699/3 "2003-03-01T17:47:46Z")

</div>

Tutorials always help… here is one that I wrote:

[http://www.kirupa.com/developer/actionscript/digital\_clock.htm](http://www.kirupa.com/developer/actionscript/digital_clock.htm)
