|
||||||
|
||||||
Free Flash Tutorial - Digital Clock

Free
Flash Tutorial
Step Three: Creating the Clock Movie Clip - Actions
You should still be in the Time MC. If you are not open the Library and find the symbol and select Edit from the drop down menu.


//Gets the hours and adds
a zero if the number is a single digit like this: 01
var hours = myDate.getHours()>9
? myDate.getHours() : "0"+myDate.getHours();
//Gets the minutes and adds
a zero if the number is a single digit like this: 01
var minutes = myDate.getMinutes()>9
? myDate.getMinutes() : "0"+myDate.getMinutes();
//Gets the seconds and adds
a zero if the number is a single digit like this: 01
var seconds = myDate.getSeconds()>9
? myDate.getSeconds() : "0"+myDate.getSeconds();
// Displays the time like
this: 00 . 01 : 01
myTime = (hours + " . " + minutes
+ " : " +
seconds);
Note: Your Timeline should look like this:
Timeline.
Note: If you cannot see the Scene 1 Tab open the Edit bar: Window > Toolbars > Edit bar
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
|
|
|

Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend:
Click here
All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.
|