Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Diagonal Keyboard Movemet
Author: Matthew Strange
| Website: www.flashlimit.co.uk |
This tutorial is for newbies and should only take a coulple of minutes to do.
We first have to make a MC of the character you want to move.
then we add these actions to it:
onClipEvent (load) {
vx = 10;
vy = 10;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
this._x -= vx;
this._y += vy;
}
if (Key.isDown(Key.DOWN)) {
this._x += vx;
this._y += vy;
}
if (Key.isDown(Key.UP)) {
this._x -= vx;
this._y -= vy;
}
if (Key.isDown(Key.RIGHT)) {
this._x += vx;
this._y -= vy;
}
}
/pre>
Thats it, very simple to do and useful for isometric games.
| » Level Basic |
|
|
Added: : 2002-08-27
Rating: 6.01 Votes: 36
Hits: 1035
|
| » Author |
|
game flash programmer
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (4 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.
|
|
|