Memuat tanggal…
Hubungi Saya
TERKINI
Memuat berita terbaru…
Ilustrasi pembelajaran digital
Materi Ajar Belajar Bersama Daring & Luring
Learning Management System

LMS SMK dr. SoebandiRuang Belajar Digital dan Tatap Muka

“Belajar bisa di mana saja, berkembang bersama.”

Portal pembelajaran untuk mendukung kegiatan belajar mengajar. Temukan bahan ajar, modul, video pembelajaran, tugas, latihan, dan informasi kelas untuk kegiatan daring maupun luring.

FasilitasMateri & Modul MetodeDaring dan Luring SekolahSMK dr. Soebandi Emailsmkdr.soebandi@gmail.com
01Materi Pembelajaran
02Video & Media
03Tugas & Latihan
04Info Kelas
Belajar Lebih Terarah

Panduan Menggunakan LMS

Unduh atau pelajari modul, video pembelajaran, dan file presentasi yang diunggah oleh pengajar

Bahan AjarModul, rangkuman, dan materi tiap mata pelajaran
Media PembelajaranVideo, gambar, presentasi, dan sumber belajar
Tugas & EvaluasiPetunjuk tugas, latihan, dan evaluasi belajar
Aktivitas KelasInformasi kegiatan pembelajaran dan diskusi

Cara Belajar

Langkah 01

Pilih materi atau mata pelajaran

Gunakan daftar postingan atau pencarian untuk menemukan topik yang dibutuhkan.

Langkah 02

Baca dan pelajari bahan ajar

Buka artikel untuk membaca materi secara lengkap serta melihat media yang disertakan.

Langkah 03

Kerjakan tugas dan latihan

Ikuti petunjuk yang ditulis pada setiap materi atau tugas pembelajaran.

Langkah 04

Belajar daring maupun luring

Materi dapat digunakan saat belajar online maupun sebagai pendamping pembelajaran tatap muka.

Creating Analog & Digital Stop Watches

Catatanku 00:35:00

Analog Stop Watch: The Hands

myMinuteHand
mySecondHand
The registration point (centre of the symbol) is at the bottom of the hands. This is important, otherwise they will not rotate correctly.
 
My second hand with registration point at base.
Place the two clock hands on the clock face in the correct position:

The clock is now assembled.
Open the Button Library (F11) and place three buttons on the Main Stage:

Everything is now ready for the ActionScript.

Analog Stop Watch: The ActionScript
Place the following ActionScript in Frame 1:
myMinute = 0;
myTimer = setInterval(wait, 1000);
function wait() {
    mySeconds++;
    _root.mySecondHand._rotation += 6;
    _root.myMinuteHand._rotation += .1;
    if (mySeconds == 60) {
        myMinute++;
        mySeconds = 0;
    }
    if (mySeconds<10) {
        myZero = 0;
    } else {
        myZero = "";
    }
}
Analog Stop Watch: The ActionScript Explained
There are two lines which different from the script in the previous example. One controls the movement of the second hand and the other the movement of the minute hand.
_root.mySecondHand._rotation += 6;
This moves the second hand 6°
I get to that by 360° in a circle divided by 60 seconds equals 6° movement every second: 360°/60 = 6°
There are 3600 seconds in an hour so if you do a similar equation for the minute hand: 360°/3600 = 0.1°
_root.myMinuteHand._rotation += .1;
This moves the minute hand 0.1°

Analog Stop Watch: The Stop Button ActionScript
on (release) {
    clearInterval(myTimer);
}
Stops the setInterval from running, which means the function 'wait' is no longer called so the actions contained within that function also stop. In this case the hands on the stop watch and digital display stop moving.

Analog Stop Watch: The Reset Button ActionScript
on (release) {
    _root.mySeconds = 0;
    _root.myMinute = 0;
    _root.myZero = 0;
    _root.myMinuteHand._rotation = 0;
    _root.mySecondHand._rotation = 0;
    clearInterval(myTimer);
}
_root.mySeconds = 0;
Resets the variable mySeconds to zero.
_root.myMinute = 0;
Resets the variable myMinute to zero.
_root.myZero = 0;
Resets the variable myZero to zero.
_root.mySecondHand._rotation = 0;
Resets the Second hand to the up-right vertical position.
_root.myMinuteHand._rotation = 0;
Resets the minute hand to the up-right vertical position.
clearInterval(myTimer);
Stops the clock. If you don't do this and you press the Reset button when the stop watch is running the hands would go back to zero and then start to move again.

Analog Stop Watch: The Go Button ActionScript
on (release) {
    clearInterval(myTimer);
    myTimer = setInterval(wait, 1000);
}
clearInterval(myTimer);
Stops the clock! You might well ask why? If the setInterval is running and then tell setInterval to run again it will run twice simultaneously! This will mean that the clock speed would go too fast: Two ticks per second! Imagine if you click the go button ten times. That's right the second hand will go around the clock face every 6 seconds!! Not much good as a timer!
myTimer = setInterval(wait, 1000);
Starts the setInterval so the goes again.
Your stop watch should now be ticking nicely at one tick per second.
This stop watch would not need very much additions to become a normal analog clock. All it would need is the hour hand and to know what the time is. Flash can get the time from the local clock on the computer it is running on or from a sever - but that's nothing to do with setInterval, so I am not going to go there.

Komentar ditutup untuk postingan ini.

Mari Terhubung

Kontak

Telepon / WhatsApp0812-3456-7890 Emailnama@sekolah.sch.id Alamat SekolahJl. Pendidikan No. 1, Kota Contoh