How can I make movieclips play on time


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.

Hefner DK

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…

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???


Good point…

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 :slight_smile: theres some stuff on there. oh yeah and getDate or wotever uses the systems time so yeah :slight_smile:

Hope someone else can use the code.

Attach the script in the movieClip itself, like

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

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

Thanks for you effort
Hefner DK

hehe cool :slight_smile: nice work