Thursday, October 27, 2011

Tutorial Adobe Flash

Creating a Wall Clock

Tick ​​tock tick tock, while waiting for iftar time we learn better with Flash animation. In Flash Tutorial this time we will try to make a simple wall clock. Curious how to make it? let us learn together in IlmuGrafis

Step - steps as follows:
1. Open the Flash program
Start>> All Programs>> Flash, select flash document
Here the author uses Flash MX 2004, but this tutorial can be applied regardless of the Adobe Flash versions including Flash CS5


2. Make a circle Use the oval tool (shortcut key: O), tips: press and hold down the shift key on the keyboard so perfectly round circle


3. Change the fill color to be black, Use the text tool (Short cut key: T) and write 1 per 1 hour numbers ranging from 1-12 for numbering figures
use the Selection tool to put the numbers - the numbers are on the clock
5. Selection of the shortest line with the selection tool (V) and press F8
window appears and insert jam_mc and select movie clip as type and make sure registrationnya point in the middle of the bottom and press ok.
Selection of movie clips in Worksheet jam_mc then press Ctrl + F3 to bring up the Properties panel. In the Properties panel that appears enter jam_mc as an instance name
 
6. Same as above
Selection of the second line (rather long), and then press F8. In the panel that pops up enter menit_mc and movie clip as type and make sure registrationnya point in the middle of the bottom and press ok.
Selection of movie clips menit_mc. In the Properties panel that appears enter menit_mc as an instance name.

7. Same as above
Selection of the third line (the longest), and then press F8. In the panel that pops up enter detik_mc and movie clip as type and make sure registrationnya point in the middle of the bottom and press ok.
Selection of movie clips detik_mc. In the Properties panel that appears enter detik_mc as an instance name.

8. Synthesize and place the order at the line with seconds and then minutes later put in place at...

   
9. Once everything is installed, click on frame 1 and press F9. In the actions pane that pops up enter the following script:



 Insert the following script code:

 //perintah yang dijalankan ketika frame dimainkan
onEnterFrame = function () {
    //membuat variable waktu sebagai date object
    waktu = new Date();
    //membuat variable jam dengan nilai sama dengan jam pada komputer
    jam = waktu.getHours();
    //membuat variable menit dengan nilai sama dengan menit pada komputer
    menit = waktu.getMinutes();
    //membuat variable detik dengan nilai sama dengan detik pada komputer
    detik = waktu.getSeconds();
    //digunakan jika komputer menggunakan sistem 12 jam
    //jika nilai variable jam lebih dari 12 maka akan dikurangi 12
    if (jam>12) {
        jam -= 12;
    }
    //movie clip jam_mc akan berotasi sesuai nilai variable jam dikali 30 yang ditambah nilai variable menit di bagi 2
    jam_mc._rotation = jam*30+(menit/2);
    //movie clip jam_mc akan berotasi sesuai nilai variable menit dikali 6
    menit_mc._rotation = menit*6;
    //movie clip detik_mc akan berotasi sesuai nilai variable detik dikali 6
    detik_mc._rotation = detik*6;
};

 10. Press Ctrl +Enter to show result.
 

No comments:

Post a Comment