LAMPIRAN A : LISTING PROGRAM
1. WordScramble.as package { import import import import import import import import import import import import import import
flash.display.MovieClip; flash.media.Sound; flash.events.MouseEvent; flash.net.URLLoader; flash.net.URLRequest; flash.text.TextFormat; flash.utils.Timer; flash.events.*; fl.controls.TextArea; fl.controls.TextInput; fl.controls.Button; fl.controls.Label; fl.events.ComponentEvent; flash.system.fscommand;
public class WordScramble extends MovieClip { private static const kamus:String = "kamus.txt"; private static const panjang_kata:Number = 3; private static const huruf_menurun:Number = 4; private static const huruf_mendatar:Number = 4; private static const uk_tombol:Number = 50; private static const waktu:Number = 121; private static const nilai:Array = [null,0,0,2,3,5,6,8,9] private private private private private private private private private private private private private private private private
var var var var var var var var var var var var var var var var
loader:URLLoader; alfabet:Array; kata:Array; kata_ketemu:Array; masukan:TextInput; tombol:Array; kata_tebakan:String; status_kata:Label; tombol_terakhir:Button; tambah_tombol:Button; hapus_tombol:Button; tombol_kembali:Button; hasil_nilai:TextArea; daftar_kata:Array; status_waktu:Label; t:Timer;
public function WordScramble() { stop(); kata_tebakan = new String(); kata_ketemu = new Array(); } private function Kamus() { LoadKamus(kamus); }
UNIVERSITAS SUMATERA UTARA
private function LoadKamus(path:String):void { loader = new URLLoader(); loader.addEventListener(Event.COMPLETE,LoadKamus2); loader.load(new URLRequest(path)); } private function LoadKamus2(e:Event):void { var isi_kamus:String = String(e.target.data); kata = isi_kamus.split(String.fromCharCode(13,10)); trace("Kamus" + kamus.length); Tampilan(); Papan(30,50,huruf_mendatar,huruf_menurun,uk_tombol); MulaiWaktu(waktu); } private function Tampilan(){ var kata:Object = new TextFormat(); kata.font = "Georgia"; kata.size = 16; kata.color = 0xFFFF00; status_kata = new Label(); status_kata.autoSize = "left"; status_kata.move(440,20); status_kata.setStyle("textFormat",kata); status_kata.text = ""; addChild(status_kata); tambah_tombol = new Button(); tambah_tombol.move(290,50); tambah_tombol.setSize(175 / 2, 30); tambah_tombol.setStyle("textFormat",kata); tambah_tombol.label = "Tambah"; tambah_tombol.addEventListener(MouseEvent.CLICK,TambahKata); addChild(tambah_tombol); hapus_tombol = new Button(); hapus_tombol.move(290,100); hapus_tombol.setSize(175 / 2, 30); hapus_tombol.setStyle("textFormat",kata); hapus_tombol.label = "Hapus"; hapus_tombol.addEventListener(MouseEvent.CLICK,HapusKata); addChild(hapus_tombol); hasil_nilai = new TextArea(); hasil_nilai.x = 440; hasil_nilai.y = 50; hasil_nilai.setSize(175,255); hasil_nilai.editable = false; addChild(hasil_nilai); status_waktu = new Label(); status_waktu.move(30,255); status_waktu.setSize(200,50); status_waktu.setStyle("textFormat",kata); status_waktu.text = " "; addChild(status_waktu);
UNIVERSITAS SUMATERA UTARA
} private function Papan(startX:Number,startY:Number,total_baris:Number,total_kolom:Numb er,uk_tombol:Number):void { var kata:Object = new TextFormat(); kata.font = "Cooper Black"; kata.size = 18; kata.color = 0xFFFF00; tombol = new Array(); var kolom:uint; var baris:uint; for(baris = 0; baris < total_baris; baris++) { for(kolom = 0; kolom < total_kolom; kolom++) { var b:Button = new Button(); b.x = startX + (kolom*uk_tombol); b.y = startY + (baris*uk_tombol); b.addEventListener(MouseEvent.CLICK, HurufTerpilih); b.label = HurufAcak(); trace("huruf " + b.label); b.setSize(uk_tombol,uk_tombol); b.setStyle("textFormat",kata); b.name = "buttonRow"+baris+"Col"+kolom; addChild(b); tombol.push(b); } } } private function HurufAcak():String { alfabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M", "N","O","P","QU","R","S","T","U","V","W","X","Y","Z"]; var frek:int =(Math.random()*99); if(0<=frek && frek<=7){trace(frek);return alfabet[0].toString();} if(frek==8){trace(frek);return alfabet[1].toString();} if(frek >= 9 && frek<=11){trace(frek);return alfabet[2].toString();} if(frek >= 12 && frek<=15){trace(frek);return alfabet[3].toString();} if(frek >= 16 && frek<=27){trace(frek);return alfabet[4].toString();} if(frek>=28 && frek<=29){trace(frek);return alfabet[5].toString();} if(frek>=30 && frek<=31){trace(frek);return alfabet[6].toString();} if(frek >=32 && frek<=37){trace(frek);return alfabet[7].toString();} if(frek >=38 && frek<=44){trace(frek);return alfabet[8].toString();} if(frek==45){trace(frek);return alfabet[9].toString();}
UNIVERSITAS SUMATERA UTARA
if(frek==46){trace(frek);return alfabet[10].toString();} if(frek >= 47 && frek<=50){trace(frek);return alfabet[11].toString();} if(frek >= 51 && frek<=52){trace(frek);return alfabet[12].toString();} if(frek >= 53 && frek<=58){trace(frek);return alfabet[13].toString();} if(frek >= 59 && frek<=65){trace(frek);return alfabet[14].toString();} if(frek >= 66 && frek<=67){trace(frek);return alfabet[15].toString();} if(frek==68){trace(frek);return alfabet[16].toString();} if(frek >=69 && frek<=74){trace(frek);return alfabet[17].toString();} if(frek >=75 && frek<=80){trace(frek);return alfabet[18].toString();} if(frek >= 81 && frek<=89){trace(frek);return alfabet[19].toString();} if(frek >= 90 && frek<=92){trace(frek);return alfabet[20].toString();} if(frek==93){trace(frek);return alfabet[21].toString();} if(frek >=94 && frek<=95){trace(frek);return alfabet[22].toString();} if(frek==96){trace(frek);return alfabet[23].toString();} if(frek>=97 && frek<=98){trace(frek);return alfabet[24].toString();} if(frek==99){trace(frek);return alfabet[25].toString();} return alfabet.toString(); } private function HurufTerpilih(e:MouseEvent):void { var b:Button = Button(e.target); trace("Pilihan: " + b.label); if(!tombol_terakhir) { KataBaru(b.label); } else if(Ketetanggaan(b,tombol_terakhir)) { TambahTebakan(b.label); } else { KataBaru(b.label); } tombol_terakhir = b; b.enabled = false; } private function TambahTebakan(huruf:String):void { kata_tebakan += huruf; status_kata.text = kata_tebakan; trace("Tambahan: " + kata_tebakan); } private function KataBaru(huruf:String):void { trace("Mulai kata baru");
UNIVERSITAS SUMATERA UTARA
var i:uint; for(i = 0; i
-1) { kata_ketemu.push(kata_tebakan); KataBaru(""); Nilai(); status_kata.text = "Kata baru ditemukan!" } else { KataBaru(""); status_kata.text = "Kata tidak ada dalam kamus!" } } else { KataBaru(""); status_kata.text = "Kata sudah dimasukkan." } } private function HapusKata(e:MouseEvent):void { KataBaru("");
UNIVERSITAS SUMATERA UTARA
} private function SudahKetemu(a:String):Boolean { var i:uint; for(i = 0; i
UNIVERSITAS SUMATERA UTARA
tombol_kembali = new Button(); tombol_kembali.move(290,150); tombol_kembali.setSize(175 / 2, 30); tombol_kembali.setStyle("textFormat",kata); tombol_kembali.label = "Kembali"; tombol_kembali.addEventListener(MouseEvent.CLICK,Kembali); addChild(tombol_kembali); status_kata.text = ""; } private function Kembali(e:MouseEvent):void { var i:uint; for(i=0; i
UNIVERSITAS SUMATERA UTARA
LAMPIRAN B : HASIL KUISIONER
Tabel Hasil Kuisioner Untuk Aspek Antarmuka dan Penggunaan Aplikasi Antarmuka Penggunaan Nama TTD 1 2 3 4 5 1 2 3 4
No 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20.
Keterangan : A = Sangat Baik B = Baik C = Kurang Baik D = Tidak Baik
UNIVERSITAS SUMATERA UTARA
No
Tabel Hasil Kuisioner untuk Aspek Penilaian Aplikasi Penilaian Nama TTD 1 2 3 4
5
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Keterangan : A = Sangat Baik B = Baik C = Kurang Baik D = Tidak Baik
UNIVERSITAS SUMATERA UTARA
I. Kriteria Aplikasi Penilaian No. 1. 2. 3. 4. 1. 2. 3. 4. 1. 2. 3. 4.
Kriteria Ketepatan warna background Ketepatan warna, posisi dan ukuran tulisan Ketepatan warna, posisi dan ukuran tombol Efek suara Pemahaman fungsi tiap tombol Pemahaman aturan dan cara bermain Kemudahan menjalankan aplikasi Kemudahan penggunaan mouse Nilai edukasi dari aplikasi Tingkat kesulitan soal Ketertarikan terhadap permainan Aturan dan cara bermain yang telah ditentukan
SB
B
4 3 7 7 6 3 9 11 15 7 7 8
16 17 13 9 13 13 10 9 4 12 12 9
KB TB 0 0 0 4 1 4 1 0 1 1 1 3
0 0 0 0 0 0 0 0 0 0 0 0
Keterangan: SB : Sangat Baik B : Baik KB : Kurang Baik TB : Tidak Baik
UNIVERSITAS SUMATERA UTARA