iseng iseng lagi takda kerjaan Pustaka flash buat sebuah aplikasi permainan musik action scripth 2 yaitu piano ,.. kelebihan dari aplikasi ini.. bisa dimainkan dengan mouse ataupun keyboard dengan A sebagai do B sebagai re dan seterusnya bagi yang penasaran dengan hasilnya bisa lihat di Demo berikut atau download sekalian hehe
jika priview demo tidak terlihat bisa klik link demo berikut :
Ini scripth yang digunakan :
stop (); qing.a.stop(); qing.b.stop(); qing.c.stop(); qing.d.stop(); qing.e.stop(); qing.f.stop(); qing.g.stop(); qing.h.stop(); qing.i.stop(); qing.j.stop(); qing.k.stop(); qing.l.stop(); qing.m.stop(); qing.n.stop(); qing.o.stop(); qing.p.stop(); qing.q.stop(); qing.r.stop(); qing.s.stop(); qing.t.stop(); qing.u.stop(); qing.v.stop(); qing.w.stop(); qing.x.stop(); qing.y.stop(); qing.z.stop(); myan = new Object(); myan.onKeyDown = function () { trace (Key.getAscii()); if (Key.isDown(65)) { qing.a.gotoAndStop(3); } // end if if (Key.isDown(66)) { qing.b.gotoAndStop(3); } // end if if (Key.isDown(67)) { qing.c.gotoAndStop(3); } // end if if (Key.isDown(68)) { qing.d.gotoAndStop(3); } // end if if (Key.isDown(69)) { qing.e.gotoAndStop(3); } // end if if (Key.isDown(70)) { qing.f.gotoAndStop(3); } // end if if (Key.isDown(71)) { qing.g.gotoAndStop(3); } // end if if (Key.isDown(72)) { qing.h.gotoAndStop(3); } // end if if (Key.isDown(73)) { qing.i.gotoAndStop(3); } // end if if (Key.isDown(74)) { qing.j.gotoAndStop(3); } // end if if (Key.isDown(75)) { qing.k.gotoAndStop(3); } // end if if (Key.isDown(76)) { qing.l.gotoAndStop(3); } // end if if (Key.isDown(77)) { qing.m.gotoAndStop(3); } // end if if (Key.isDown(78)) { qing.n.gotoAndStop(3); } // end if if (Key.isDown(79)) { qing.o.gotoAndStop(3); } // end if if (Key.isDown(80)) { qing.p.gotoAndStop(3); } // end if if (Key.isDown(81)) { qing.q.gotoAndStop(3); } // end if if (Key.isDown(82)) { qing.r.gotoAndStop(3); } // end if if (Key.isDown(83)) { qing.s.gotoAndStop(3); } // end if if (Key.isDown(84)) { qing.t.gotoAndStop(3); } // end if if (Key.isDown(85)) { qing.u.gotoAndStop(3); } // end if if (Key.isDown(86)) { qing.v.gotoAndStop(3); } // end if if (Key.isDown(87)) { qing.w.gotoAndStop(3); } // end if if (Key.isDown(88)) { qing.x.gotoAndStop(3); } // end if if (Key.isDown(89)) { qing.y.gotoAndStop(3); } // end if if (Key.isDown(90)) { qing.z.gotoAndStop(3); } // end if }; myan.onKeyUp = function () { qing.a.gotoAndStop(1); qing.b.gotoAndStop(1); qing.c.gotoAndStop(1); qing.d.gotoAndStop(1); qing.e.gotoAndStop(1); qing.f.gotoAndStop(1); qing.g.gotoAndStop(1); qing.h.gotoAndStop(1); qing.i.gotoAndStop(1); qing.j.gotoAndStop(1); qing.k.gotoAndStop(1); qing.l.gotoAndStop(1); qing.m.gotoAndStop(1); qing.n.gotoAndStop(1); qing.o.gotoAndStop(1); qing.p.gotoAndStop(1); qing.q.gotoAndStop(1); qing.r.gotoAndStop(1); qing.s.gotoAndStop(1); qing.t.gotoAndStop(1); qing.u.gotoAndStop(1); qing.v.gotoAndStop(1); qing.w.gotoAndStop(1); qing.x.gotoAndStop(1); qing.y.gotoAndStop(1); qing.z.gotoAndStop(1); }; Key.addListener(myan); qing.a.onPress = function () { this.gotoAndStop(3); }; qing.a.onRelease = qing.a.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.b.onPress = function () { this.gotoAndStop(3); }; qing.b.onRelease = qing.b.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.c.onPress = function () { this.gotoAndStop(3); }; qing.c.onRelease = qing.c.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.d.onPress = function () { this.gotoAndStop(3); }; qing.d.onRelease = qing.d.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.e.onPress = function () { this.gotoAndStop(3); }; qing.e.onRelease = qing.e.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.f.onPress = function () { this.gotoAndStop(3); }; qing.f.onRelease = qing.f.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.g.onPress = function () { this.gotoAndStop(3); }; qing.g.onRelease = qing.g.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.h.onPress = function () { this.gotoAndStop(3); }; qing.h.onRelease = qing.h.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.i.onPress = function () { this.gotoAndStop(3); }; qing.i.onRelease = qing.i.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.j.onPress = function () { this.gotoAndStop(3); }; qing.j.onRelease = qing.j.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.k.onPress = function () { this.gotoAndStop(3); }; qing.k.onRelease = qing.k.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.l.onPress = function () { this.gotoAndStop(3); }; qing.l.onRelease = qing.l.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.m.onPress = function () { this.gotoAndStop(3); }; qing.m.onRelease = qing.m.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.n.onPress = function () { this.gotoAndStop(3); }; qing.n.onRelease = qing.n.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.o.onPress = function () { this.gotoAndStop(3); }; qing.o.onRelease = qing.o.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.p.onPress = function () { this.gotoAndStop(3); }; qing.p.onRelease = qing.p.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.q.onPress = function () { this.gotoAndStop(3); }; qing.q.onRelease = qing.q.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.r.onPress = function () { this.gotoAndStop(3); }; qing.r.onRelease = qing.r.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.s.onPress = function () { this.gotoAndStop(3); }; qing.s.onRelease = qing.s.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.t.onPress = function () { this.gotoAndStop(3); }; qing.t.onRelease = qing.t.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.u.onPress = function () { this.gotoAndStop(3); }; qing.u.onRelease = qing.u.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.v.onPress = function () { this.gotoAndStop(3); }; qing.v.onRelease = qing.v.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.w.onPress = function () { this.gotoAndStop(3); }; qing.w.onRelease = qing.w.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.x.onPress = function () { this.gotoAndStop(3); }; qing.x.onRelease = qing.x.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.y.onPress = function () { this.gotoAndStop(3); }; qing.y.onRelease = qing.y.onReleaseOutside = function () { this.gotoAndStop(1); }; qing.z.onPress = function () { this.gotoAndStop(3); }; qing.z.onRelease = qing.z.onReleaseOutside = function () { this.gotoAndStop(1); };
5 Halaman yang sering dikunjungi:
0 komentar:
Post a Comment