Map goes off page

can someone take a look at the attached .fla, i managed to create a map that moves with the keyboard arrows but now, I noticed that the map doesnt stop at the edges. if you move it to any far side it keeps going off the page. is there a action script to tell the mc to stop once it reaches the end of the map?

Any suggestions or tutorial link?