Documente Academic
Documente Profesional
Documente Cultură
ENTE R
HOME
TUTORIAL
SCRIPT
QUIT
Hello guys, Would you like to make ur website be a beautiful web? Would you give them with digital clock ? If you want, Please click tutorial button. This tutorial for learn how to make a digital clock in
flash by yourself
HOME
TUTORIAL
SCRIPT
QUIT
S T E P 1
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Set area to 180pixel x 55pixel. (Ctrl + F3, click size, and change dimension)
S T E P 2
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Make Rectangle tool(R) 180 pixel x 55 pixel, and give a color : #0000FF, and click Ctrl+K to set the align.
S T E P 3
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Make Rectangle tool(R) again 140 pixel x 30 pixel, and give a color : #33CCFF, and click Ctrl+K to set the align.
S T E P 4
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Double click on layer 1 to rename its name in background. And then add a new layer and name it dynamic text.
S T E P 5
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Then, click on the second frame of layer background and press F5 key.
S T E P 6
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Select the dynamic text layer and take the Text Tool (T). Then, create a dynamic text field over the white rectangle.
S T E P 7
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
While the dynamic text field that we just created is still selected, go to the Properties Panel (Ctrl+F3) below the stage. On the left side, You will find the Instance name input field there. Call this dynamic field Clock_text.
S T E P 8
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Create a new layer above the dynamic text layer and name it action.
S T E P 9
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
Click on the first frame of layer action and open the Action Script Panel (F9).
S T E P 10
NEXT| PREVIOUS
Then, enter the following code inside the actions panel. (You can get the script in Script Button)
HOME
TUTORIAL
SCRIPT
QUIT
Click on the second frame of layer action and press F6 key. Then, enter this code inside the actions panel:
S T E P 11
Script action
NEXT| PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
S T E P 12
PREVIOUS
HOME
TUTORIAL
SCRIPT
QUIT
First Script time=new Date(); // time object var seconds = time.getSeconds() var minutes = time.getMinutes() var hours = time.getHours() if (hours<12) { ampm = "AM"; } else{ ampm = "PM"; } while(hours >12){ hours = hours - 12; } if(hours<10) { hours = "0" + hours; } if(minutes<10) { minutes = "0" + minutes; } if(seconds<10) { seconds = "0" + seconds; } Clock_text.text = hours + ":" + minutes + ":" + seconds +" "+ ampm;
Second Script
gotoAndPlay(1);
S C R I P T
Created By :
TEKNIK INFORMATIKA E
Siti Maghfiroh 201310370311218