langkah-langkah Sound Card



Langkah-Langkah membuat Sound Card


1.Buka Macromedia (flash Professional 8) , lalu klik flash Document. Akan tampil gambar :









2.Pada layer1 tukar namanya dengan action, lalu klik ditool “Regtangle tool (R)”, pilih warnah yang akan dibuat untuk tempat sound (persegi),
untuk action :
mySound = new Sound();









3.
Setelah itu, buat layer dengan nama tombol

4.Klik windows > common libraries > buttons
















5.Pilih buttons yang telah ditentukan



















6.Lalu tarik satu persatu dari table name ke table persegi yang telah dibuat














7.Kemudian buat layer baru dengan nama “box”, setelah itu berikan nama masing-masing pada tombol













8.Untuk membuat musik pada daftar musik



















Klik file > import > Import to library, lalu pilih musik yang diinginkan

9.Setelah itu, klik kanan pada musik > linkage




























10.Untuk mengisi action pada setiap tombol, dengan cara klik sekali pada tombol.

Start : on (release) {mySound.start(); }
Stop : on (release) {mySound.stop(); }
Musik1 : on (release) { mySound.attachSound("musik1"); mySound.stop(); mySound.start(0,1); }
Musik2 : on (release) { mySound.attachSound("musik2"); mySound.stop(); mySound.start(0,1); }
Musik3 : on (release) { mySound.attachSound("musik3"); mySound.stop(); mySound.start(0,1); }
Untuk klik 2 kali:
Volume
top = vol._y;
left = vol._x;
right = vol._x;
bottom = vol._y+100;
level = 100;
//
vol.onPress = function() {
startDrag("vol", false, left, top, right, bottom);
dragging = true;
};
vol.onRelease = function() {
stopDrag();
dragging = false;
};
vol.onReleaseOutside = function() {
dragging = false;
};
//
this.onEnterFrame = function() {
if (dragging) {
level = 100-(vol._y-top);
} else {
if (level>100) {
level = 100;
} else if (level<0)>
level = 0;
} else {
vol._y = -level+100+top;
}
}
_root.mySound.setVolume(level);
};
Balance
increment = 4;
level = 0;
//
panKnob.onPress = function() {
if (Key.isDown(Key.getCode(18))) {
autoPan = true;
} else {
autoPan = false;
start = _root._xmouse;
newStart = panKnob._rotation;
dragging = true;
}
};
panKnob.onRelease = function() {
dragging = false;
};
panKnob.onReleaseOutside = function() {
dragging = false;
};
//
this.onEnterFrame = function() {
if (dragging) {
pivot = (_root._xmouse-start)*2+newStart;
panKnob._rotation = pivot;
if (pivot<-135) {
panKnob._rotation = -135;
}
if (pivot>135) {
panKnob._rotation = 135;
}
level = Math.round(panKnob._rotation/1.35);
} else {
if (autoPan) {
textInput.value.selectable = false;
level += increment;
if (level>99 || level<-99) {
increment *= -1;
}
} else {
textInput.value.selectable = true;
}
if (level>100) {
level = 100;
} else if (level<-100) {
level = -100;
} else if (level<=100 && level>=-100) {
panKnob._rotation = level*1.35;
}
}
_root.mySound.setPan(level);
};
10.Gambar Sound Card yang sudah siap















11.Setelah itu Sound Card bisa dijalankan

















Fungsi-Fungsi Dari Action


1.mySound = new Sound(); pada Layer Action pada Scene 1
Fungsi : agar sound (musik) bisa terbaca dan dijalankan, makanya dibuat sound baru dilayer Action

2.
on (release) { mySound.attachSound("musik1"); mySound.stop(); mySound.start(0,1); } pada Tombol “Musik 1”
Fungsi : Untuk mengeluarkan dan melampirkan musik1 agar bisa dijalankan, musik1 juga bisa dihentikan dan diplay apabila tombol diklik.

3.
on (release) {mySound.start(); } pada Tombol “Play”
Fungsi : untuk menghubungkan, agar musik bisa dimulai (start)

4.
_root.mySound.setVolume(level); pada akhir tombol volume
Fungsi : untuk mengatur volume, agar suara bisa diset (kecil/besar) suara musik.

5.
_root.mySound.setPan(level); pada akhir tombol balance
Fungsi : untuk mengatur balance, agar suara bisa diset (turun/naik) suara musik


Tidak ada komentar:

Posting Komentar