Macromedia Flash - Create current date and time notifications

In this lesson, you will learn how to create a file that announces the current date with flash. Just use the given code to quickly create this file.

In this lesson, you will learn how to create a file that announces the current date with flash. Just use the given code to quickly create this file. You can place this file on websites, where it is necessary to display the current date and time.

In addition to being more lively, create more colors or background images for this date and time notification.

Step 1

Open a new Flash file, format the width and height of the file (Ctrl + J).

Step 2

Select the Text Tool (T) and go to the Properties Panel (Ctrl + F3). In the left part, you will see a Text Type box drop down. Select Dynamic Text in this menu box:

Macromedia Flash - Create current date and time notifications Picture 1Macromedia Flash - Create current date and time notifications Picture 1

Draw a rectangle to display the date in this rectangle

Macromedia Flash - Create current date and time notifications Picture 2Macromedia Flash - Create current date and time notifications Picture 2

Step 3

Go back to the Properties Panel (Ctrl + F3), in Var section enter date

Macromedia Flash - Create current date and time notifications Picture 3Macromedia Flash - Create current date and time notifications Picture 3

Step 4

Repeat steps 2 and 3 to draw another text box to display the time right below the date range you just drawn, and the var value of this cell you enter time

Step 5

Select the two text boxes you just drew, press F8 (Convet to Symbol) to convert this text box into a Movie Clip Symbol

Step 6

Pick the Selection Tool (V) and click on the newly created Movie Clip. Go to the Action Script Panel (F9) and include the following code:

onClipEvent (load) {
weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "Month" 10 "," November "," December "];
}

onClipEvent (enterFrame) {
myDate = new Date ();
day = weekdays [myDate.getDay ()];
Month = months [myDate.getMonth ()];
Date = myDate.getDate ();
Year = myDate.getFullYear ();
Hour = myDate.getHours ();
Min = myDate.getMinutes ();
Ssec = myDate.getSeconds ();
date = "Today," + TAY + "date" + Date + "" + Month + ", year" + Year;
time = "Now:" + Hour + "hour" + Min + "minutes" + Ssec + "seconds";
}

Try checking the product you just created. If not, you can download the source file here!

4 ★ | 2 Vote