Search Tutorials
Step 1: Basic movementokay, 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
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||
|