# Time Problem

**URL:** <https://forum.kirupa.com/t/time-problem/294508>\
**Category:** Uncategorized\
**Created:** [August 15, 2009, 6:56am UTC](https://forum.kirupa.com/t/time-problem/294508 "2009-08-15T06:56:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nyxl092385](https://avatars.discourse-cdn.com/v4/letter/n/43a26b/32.png) [@nyxl092385](https://forum.kirupa.com/u/nyxl092385)\
**Post date:** [August 15, 2009, 6:56am UTC](https://forum.kirupa.com/t/time-problem/294508/1 "2009-08-15T06:56:55Z")

</div>

hi i have downloaded a program that is a clock and here is the code

onClipEvent (enterFrame) {  
myTime = new Date();  
nSeconds = myTime.getSeconds();  
nMinutes = myTime.getMinutes();  
nHours = myTime.getHours();  
if (hours\>=12) {  
ampm = “pm”;  
} else {  
ampm = “am”;  
}  
if (hours\>=13) {  
nHours = nHours-12;  
}  
if (length(nMinutes) == 1) {  
nHinutes = “0”+nMinutes;  
}  
if (length(nSeconds) == 1) {  
nSeconds = “0”+nSeconds;  
}  
nTime = nHours+":"+nMinutes+":"+nSeconds+" "+ampm;  
}

onClipEvent (load){  
mon = [“Jan”,“Feb”,“Mar”,“Apr”,“May”,“Jun”,“Jul”,“Aug”,“Oct”,“Nov”,“Dec”];  
weekdays = [“Sunday”,“Monday”,“Tuesday”,“Wednesday”,“Thursday”,“Friday”,“Saturday”];  
}  
onClipEvent (enterFrame){  
now = new Date()  
nDay = weekdays[now.getDay()]  
nMonth = mon[now.getMonth()]  
nDate = now.getDate()  
nYear = now.getFullYear()  
displayDate = nMonth+" “+nDate+”, "+nYear  
displayDay = nDay  
}

it gets the date and time from your computer  
my question is how can i turn this so that  
i can play a movieclip on a certain time  
please help me

here is my email [nyxl@underdogdv.com](mailto:nyxl@underdogdv.com)

thank you
