HOW TO MAKE A CHARACTER MOVE ON KEY PRESS

First of all setup you character and convert to a movie clip then select your character and then press F9 to open the action scripts menu and type in these.
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x--;
}
if (Key.isDown(Key.RIGHT)) {
_x++;
}
if (Key.isDown(Key.UP)) {
_y--;
}
if (Key.isDown(Key.DOWN)) {
_y++;
}
}
Note test your movie.

0 comments:

Post a Comment

Warning! Do not use swear words / slangs when posting.

Popular Posts