# getHours question

**URL:** <https://forum.kirupa.com/t/gethours-question/117462>\
**Category:** Uncategorized\
**Created:** [July 27, 2004, 5:24pm UTC](https://forum.kirupa.com/t/gethours-question/117462 "2004-07-27T17:24:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![projectbios](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@projectbios](https://forum.kirupa.com/u/projectbios)\
**Post date:** [July 27, 2004, 5:24pm UTC](https://forum.kirupa.com/t/gethours-question/117462/1 "2004-07-27T17:24:55Z")

</div>

I’m trying to load a movieclip at a certain time, 6 p.m.

I have found this script here.  
onClipEvent (enterFrame) {  
daynight = new Date();  
dayframe = daynight.getHours()+1;  
this.gotoAndStop(dayframe);  
}

but it only makes it tween along. I need to know how to do something like:  
from 6 a.m to 6 p.m it stays on one frame, and at 7 p.m to 5:00 a.m it plays another another frame (frame2).

How is this done?

thanks.
