How To Create A Clock In Flash

Table of contents:

How To Create A Clock In Flash
How To Create A Clock In Flash

Video: How To Create A Clock In Flash

Video: How To Create A Clock In Flash
Video: Make An Analog Clock in Flash 2024, May
Anonim

The flash clock can be a stylish element of your computer desktop. They can be used as a screensaver on many modern mobile phones. If you are creating a website, then such a watch will be a good addition to the interface. With Flash technology, you can create really beautiful watch faces. It all depends on your imagination.

How to create a clock in flash
How to create a clock in flash

Necessary

Macromedia Flash

Instructions

Step 1

Install Macromedia Flash software. It can be downloaded from the official Adobe developer site. Run the installer and follow the instructions that appear on the screen. Once completed, launch the program using the created shortcut on the desktop.

Step 2

Select Create New Flash Document. Create 3 layers that you need to control the display, namely "Code", "Arrows", "Background".

Step 3

Go to the "Arrows" layer by clicking on the layers palette on the left side of the program window. Draw 3 hands of different lengths (for seconds, hours and minutes, respectively).

Step 4

Move each arrow to the "Movie Clip" with the right mouse button. Go to the "Code" layer, click on the first frame. At the bottom of the window, write the code: hours = fscommand2 (“GetTimeHours”);

minutes = fscommand2 (“GetTimeMinutes”);

seconds = fscommand2 (GetTimeSeconds”);

hourspoint._rotation = 30 * hours + 0.5 * minutes;

minutepoint._rotation = * 6minutes + 0.1 * seconds;

secondpoint._rotation = 6 * seconds;

gotoAndPlay (1);

Step 5

The hours variable gets the corresponding time using the "GetTimeHours" function. Minutes and seconds work the same way. The hour hand was named hourspoint, while the minutepoint and secondpoint hands were named minute and second values. Give each arrow a name in the corresponding Arrows layer window at the bottom of the window in the Properties tab.

Step 6

Move all arrows to one. This will be the original 12 o'clock point. Create the desired image on the "Background" layer. Then go to File - New - Export Movie. Give your watch a name. Specify the type swf, click "Save", FlashLite version 1.1. Quality "JPEG - 100%". Your analog clock is ready.

Recommended: