Basically, this tutorial can be developed to create a game or a simple game. Maybe you've seen or even you've never played a fighter game, to move these aircraft we can use the navigation arrows on the keyboard. Arrows keys up, down, left and right are used to control the movement of aircraft. Surely, you ask what is difficult to make navigation by using keyboard? Certainly not because Flash has been providing practical printah-printah to move the picture or any object through the buttons on the keyboard. The following steps create a simple navigation using arrows on the keyboard.
1. Open Flash and create pages 1 fruit layer with a layer navigation
2. Navigation layer click on the file> inport> import to library select the object to be used as the main navigation
3. Click on an object which is used as navigation object and press F9 and typing script below
onClipEvent (enterFrame) {
if(Key.isDown(Key.UP)) {
this._y -=10;
Lisensi Dokumen:
Copyright © 2006-2007 ilmuwebsite.com
Dokumen di ilmuwebsite.com dapat digunakan, dimodifikasi dan disebarkan secara
bebas untuk tujuan bukan komersial (nonprofit), dengan syarat tidak menghapus atau
merubah atribut penulis dan pernyataan copyright yang disertakan dalam setiap
dokumen. Tidak diperbolehkan melakukan penulisan ulang, kecuali mendapatkan ijin
terlebih dahulu dari ilmuwebsite.com..
Tujuan : Memajukan Ilmu Website Indonesia
}
if(Key.isDown(Key.DOWN)) {
this._y +=10;
}
if (Key.isDown(Key.RIGHT)) {
this._x +=10;
}
if (Key.isDown(Key.LEFT)) {
this._x -=10;
}
}
4.
4. Press Ctrl + enter to see the results OK,
good luck



LinkBack URL
About LinkBacks

Bookmarks