# Digital Clock probs with TextFields!

**URL:** <https://forum.kirupa.com/t/digital-clock-probs-with-textfields/234649>\
**Category:** Uncategorized\
**Created:** [August 4, 2007, 8:40am UTC](https://forum.kirupa.com/t/digital-clock-probs-with-textfields/234649 "2007-08-04T08:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lambros](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@lambros](https://forum.kirupa.com/u/lambros)\
**Post date:** [August 4, 2007, 8:40am UTC](https://forum.kirupa.com/t/digital-clock-probs-with-textfields/234649/1 "2007-08-04T08:40:00Z")

</div>

Hey guys i have a problem but i don’t know why i have it!!  
i made a digital clock with just two dynamic text fileds and script. when i test it on a new actionscript document it works perfectly but when i put it in a movie clip in my site the text fields are not updated and donot display anything . . like it doesn’t run at all…

what’s the problem ???

here is the actionscipt i am using inside that movieclip, tell me if there are any mistakes!!!

```auto
        DigitalClock();
        
        function DigitalClock() {
            getSystemTime();
        }
        
        function getSystemTime()
        {
            var myDate:Date = new Date();
            var seconds = myDate.getSeconds();
            var minutes = myDate.getMinutes();
            var hours = myDate.getHours();
            var day = myDate.getDay();
            var date = myDate.getDate();
            var month = myDate.getMonth();
            var year = myDate.getFullYear();
            var ampm:String;
            
            
            if (day==0){
                day = "Sunday"
            } else if (day==1){
                day = "Monday"
            } else if (day==2){
                day = "Tuesday"
            } else if (day==3){
                day = "Wednesday"
            } else if (day==4){
                day = "Thursday"
            } else if (day==5){
                day = "Friday"
            } else if (day==6){
                day = "Saturday"
            }
            
            if (month==0){
                month = "January"
            } else if (month==1){
                  month = "February"
            } else if (month==2){
                month = "March"
            } else if (month==3){
                month = "April"
            } else if (month==4){
                month = "May"
            } else if (month==5){
                month = "June"
            } else if (month==6){
                month = "July"
            } else if (month==7){
                month = "August"
            } else if (month==8){
                month = "September"
            } else if (month==9){
                month = "October"
            } else if (month==10){
                    month = "November"
            } else if (month==11){
                month = "December"
            }
            
            
            if (minutes<10) {
                minutes = "0"+minutes;
            }
            if (seconds<10) {
                seconds = "0"+seconds;
            }
            
            
            if (hours>12 ) {
                hours = hours-12;
                ampm = "PM";
            } else if (hours == 12) {
                ampm = "PM";
            } else {
                ampm = "AM";
            }
            if (hours == 0) {
                hours = 12;
            }
            
            timeText_txt.text = ((hours) + ":" + (minutes) + ":" + (seconds) + " " + (ampm));
            dateText_txt.text = ((day) + " " + (date) + " " + (month) + " " + (year));
            
        }

```

and i have another frame where i have the code  
gotoAndPlay(“update”)  
where update is the frame lable for frame one where the whole actionscript is in…

please help me on this
