This tutorial will help you to learn how to create a digital clock using FlashMx 2004.
To view the digital clock you must first install Flash player 7.0 and download .fla file that is included at the end of the tutorial. To download .fla file you must install Flash Mx 2004.
The following are the steps to create a digital clock using FlashMX 2004
To create a digital clock in FlashMX 2004 you must install FlashMX 2004 in your system.
First you must insert three layers in the time line window and name the layers as “background”, “text”, and “action” as shown below:
Then design the framework for the digital clock after selecting the Frame1 of the “background” layer. And then choose Frame2 and press F5.
Then insert Dynamic text field in the work area of the Frame1 of the “text” layer and select Frame2 and press F5. And name the Dynamic text field as “clock_txt”
Dynamic text field can be inserted in the work area by following the steps given below:
Select the text tool from the tool box.
Then the Dynamic text field is selected from the pop-up menu in the
property inspector.
Then place the digital clock by clicking on the work area where you want to place the clock.
Then copy the script given below in the action panel of the Frame1 of the “action” layer.
time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
if (hours<12) {
ampm = "AM";
}