-
Internal Clock Script?
Hi, I was just wondering if there was a script function I could use to call upon the internal clock of the computer running the animation.
I'm making a screensaver, and I want the color of the sky to change depending on what time the user's internal clock is set at.
So, is there?
-
Hi,
you can use the Date class of flash:
Code:
var d = new Date;
d.getTime();
You have to call the getTime() function on every frame because the time in the Date object doesn't change while the real time passes.
To access the time values, you can use the following functions:
Code:
d.getSeconds();
d.getMinutes();
d.getHours();
There's more information about the Date class in the 3DFA syntax helper or here:
http://livedocs.adobe.com/flash/9.0/...efV3/Date.html
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|