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: 5.5 Votes: 10 |
» Author |
Hello. |
» Download |
Download the files used in this tutorial. |
Download (5 kb) |
» Forums |
More help? Search our boards for quick answers! |