Follow Us !

Membuat dinding untuk permainan platform - Flash Tutorial


Tutorial :
1.buatlah lingkarran (lalu seleksi)
2.click kanan -> convert to symbol -> movie clip -> rball (nama untuk movie clip dan label yang di properties)
3.buka action copy kan script di bawah ini (rball):
onClipEvent (enterFrame) {
 if (Key.isDown( key.LEFT)) {
 _x-=5;
 }
if (Key.isDown( key.RIGHT)) {
 _x+=5;
 }
if (Key.isDown( key.UP )) {
 _y-=5;
 }
if (Key.isDown( key.DOWN )) {
 _y+=5;
 }
}

4.gambarlah sebuah persegi (seleksi)
5.click kanan -> conver to symbol -> movie clip -> mc3(nama dan label)
6.copy kan script di bawah ini (mc3) :
onClipEvent (enterFrame) {
with (_root.rball) {
if (_root.mc3.hitTest(getBounds(_root).xMax, _y, true)) {
_x -= 5;
}
if (_root.mc3.hitTest(getBounds(_root).xMin, _y, true)) {
_x += 5;
}
if (_root.mc3.hitTest(_x, getBounds(_root).yMax, true)) {
_y -= 5;
}
if (_root.mc3.hitTest(_x, getBounds(_root).yMin, true)) {
_y += 5;
}
}
}

7.klik frame 1 pada scene mu -> action
8.copy kan script di bawah ini (frame 1) :
stop();

NOTE : PASTIKAN RBALL DAN MC3 DI LAYER YANG BERBEDA

DOWNLOAD FLA FILE (MEMBUAT DINDING UNTUK PERMAINAN PLATFORM)
Mediafire DownLink

0 komentar:

Posting Komentar

If You Find Broken Link please Comment here ! we will refresh that Link :D