Hey man, without boundaries, the playable character is unstoppable.
Draw four walls with instances; wallw, wallx, wally, wallz, around the stage and convert each wall to a movie clip. In the actions panel input the code below, where # = variable .hittest value, which must be higher than the _x and _y velocity values of your character. If your character's velocity values are higher, then he'll slowly permeate through the walls like a REALLY funky monkey :D
onClipEvent(enterFrame){
if(Key.isDown(Key.RIGHT)){
_x += #;
}
if(Key.isDown(Key.LEFT)){
_x -= #;
}
if(Key.isDown(Key.UP)){
_y -= #;
}
if(Key.isDown(Key.DOWN)){
_y += #;
}
if(this.hitTest(_root.wall)){
this._x += #;
}
if(this.hitTest(_root.wall1)){
this._x += #;
}
if(this.hitTest(_root.wall2)){
this._y += #;
}
if(this.hitTest(_root.wall3)){
this._y -= #;
}
}
Lovely game, though I recommend the ability to control either character simultaneously, as well as increasing their walking speed. Well-done, otherwise :)