# How can I make movieclips play on time

**URL:** https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158
**Category:** flash
**Created:** [September 3, 2002, 11:12am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158 "2002-09-03T11:12:47Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Hefner\_DK](https://avatars.discourse-cdn.com/v4/letter/h/94ad74/32.png) [@Hefner\_DK](https://forum.kirupa.com/u/Hefner_DK)
#### Post date: [September 3, 2002, 11:12am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/1 "2002-09-03T11:12:47Z")

</div>

Hi

How can I make a movieclip play on an exact time daily?

Ex. to make a bird fly exacly 06:00 every morning on a website.

Hope there is help to get.

Thanx  
Hefner DK

---

<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: [September 4, 2002, 3:09am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/2 "2002-09-04T03:09:16Z")

</div>

Not sure but you have to be able to get the Server time some how. You need a script that runs probably under [COLOR=blue]onClipEvent (enterFrame)[/COLOR] and constantly checks the server time.

Just a guess…

---

<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: [September 4, 2002, 5:48am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/3 "2002-09-04T05:48:52Z")

</div>

I think you would want the users system time - not the server time… that way if you want something played at 6am - it will be 6am for everyone who sees it. Otherwise if your server is in NYC then it would be playing at 3am for someone in CA. If you dont care about that well then do it differently!

or am I way off on this one???

Peace

---

<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: [September 4, 2002, 10:23am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/4 "2002-09-04T10:23:41Z")

</div>

Good point…

---

<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: [September 4, 2002, 10:41am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/5 "2002-09-04T10:41:09Z")

</div>

yeah i think you could use getDate or getTime and then just have an if saying if its that time… check the actionscript dictionary for that one 🙂 theres some stuff on there. oh yeah and getDate or wotever uses the systems time so yeah 🙂

---

<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: [September 4, 2002, 10:50am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/6 "2002-09-04T10:50:43Z")

</div>

Hope someone else can use the code.

Attach the script in the movieClip itself, like

onClipEvent(enterframe) {  
myHour = new Date()  
if (myHour.getHours() == 19) {  
play()  
}  
}

Of course you should put stop() in the first frame of the movieClip.

Thanks for you effort  
Hefner DK  
:rambo:

---

<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: [September 4, 2002, 10:52am UTC](https://forum.kirupa.com/t/how-can-i-make-movieclips-play-on-time/5158/7 "2002-09-04T10:52:13Z")

</div>

hehe cool 🙂 nice work
