Memanggil Mangkok Dari Library Dan Ditaruh Ke
Memanggil Mangkok Dari Library Dan Ditaruh Ke
02 _root.attachMovie(“mangkok”,”mangkok”,0,{_x:275,_y:350});
07
08 //mereset waktu
09 score = 0;
10 waktu = 5;
11
13 _root.onEnterFrame=function(){
15 mangkok._x = _xmouse;
16 }
17
19 function panggilTelur(){
20 //menciptakan angka random
23
26 objekYangDipanggil = “telur”;
28 objekYangDipanggil = “telur_emas”;
29 }else{
30 objekYangDipanggil = “batu”;
31 }
36 objek._x = random(500);
37 objek._y = 0;
41 objek.onEnterFrame=function(){
43 this._y += 10;
45
if(this.hitTest(_root.mangkok)){
47 if(this.nama == “telur”){
48 score += 10;
50 score += 20;
51 }else{
52 score -= 10;
53 }
54 //kemudian menghapusnya
55 delete this.onEnterFrame;
4 56 this.removeMovieClip();
4
57 }
59 if(this._y>=450
61 delete this.onEnterFrame;
62 this.removeMovieClip();
63 }
64 }
65 }
66
68 function kurangiWaktu(){
69 waktu -= 1;
71 if(waktu == 0){
73 for(i=0;i<=_root.getNextHighestDepth();i++){
74 _root.getInstanceAtDepth(i).removeMovieClip();
75 }
77 clearInterval(telurInterval);
78 clearInterval(waktuInterval);
79 //pergi ke frame 3
80 _root.gotoAndStop(3);
81 }
82 }