# Daylight

**URL:** <https://forum.kirupa.com/t/daylight/106706>\
**Category:** Uncategorized\
**Created:** [April 8, 2004, 2:32am UTC](https://forum.kirupa.com/t/daylight/106706 "2004-04-08T02:32:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![de\_stok](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@de\_stok](https://forum.kirupa.com/u/de_stok)\
**Post date:** [April 8, 2004, 2:32am UTC](https://forum.kirupa.com/t/daylight/106706/1 "2004-04-08T02:32:35Z")

</div>

Hi there… on my website i want to put in a funny detail. i made a movie with a nice cartoon landscape. what i wan’t to do is make a difference between night and day so if someones come in at 3 am it’s dark and om 3 pm it’s a normal blue sky to check my website and get an idea about it check [www.milkandcookiefactory.com](http://www.milkandcookiefactory.com) i know there is a code so i can set the time but can i make it diferent so my movie changes… i hope so. if u don’t understand my question please answer this message.

Regards Jos

---

<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:** [April 8, 2004, 3:22am UTC](https://forum.kirupa.com/t/daylight/106706/2 "2004-04-08T03:22:58Z")

</div>

something like this should work, you just have to adjust it to your needs.

```auto

myTime = new Date();
nHours = myTime.getHours();
this.onEnterFrame = function() {
	if (nHours == 12) {
		trace("ok");
	} else {
		myColor = new Color(mc);
		myColor.setRGB(0x990000);
	}
};

```

---

<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:** [April 8, 2004, 4:28am UTC](https://forum.kirupa.com/t/daylight/106706/3 "2004-04-08T04:28:48Z")

</div>

> [@blah-de-blah](#):
>
> something like this should work, you just have to adjust it to your needs.
> 
> ```auto
> 
> myTime = new Date();
> nHours = myTime.getHours();
> this.onEnterFrame = function() {
> if (nHours == 12) {
> trace("ok");
> } else {
> myColor = new Color(mc);
> myColor.setRGB(0x990000);
> }
> };
> 
> ```

sorry maybe i wrote it wrong but i have to change the backgroundcolour. to dark blue at night ios that possible? and how?

---

<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:** [April 8, 2004, 4:55am UTC](https://forum.kirupa.com/t/daylight/106706/4 "2004-04-08T04:55:15Z")

</div>

I’m not too sure about that, the only way i can think of is make the MC the size of the page and change that color…
