Search tutorials
Step 1: Basic movement
okay, now make 2 invisible walls in the stage, a few pixels away from the Map MC.
Instance the one on the right, 'right', and on the left, 'left'.
add this code to the map MC:
onClipEvent (enterFrame) {
if ((Key.isDown(Key.LEFT)) && (!_root.map.hit.hitTest(_root.right))) {
this._x += 2;
}
}
onClipEvent (enterFrame) {
if ((Key.isDown(Key.RIGHT) && (!_root.map.hit.hitTest(_root.left)))) {
this._x -= 2;
}
}
Well, that's it, I think. Next tutorial covers going into other rooms. So you better save that .fla for next time!
~~~Paco Bell
| » Level Advanced |
|
Added: 2005-07-20 Rating: 6 Votes: 9 |
| » Author |
| Hello. |
| » Download |
| Download the files used in this tutorial. |
| Download (5 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!