Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Easiest Keyboard Character Movement
Author: Phantom
| Website: www.phantom-games.tk |
Creating your character
First create a character a convert it to a Movie Clip (F8), then open the Actions Panel(F9) and write the following code:
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
this._y -=3
}
if(Key.isDown(Key.DOWN)){
this._y +=3
}
if(Key.isDown(Key.LEFT)){
this._x -=3
}
if(Key.isDown(Key.RIGHT)){
this._x +=3
}
}
Note: You can change the number 3 for wherever you wish, the difference is the speed.
That´s all.
| » Level Basic |
|
|
Added: : 2007-04-21
Rating: 7.00 Votes: 13
Hits: 1073
|
| » Author |
|
Flash Game designer.
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (5 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|