[Flash8-AS2.0]Need help getting script for wall collisions

This is for a school project so its kinda important that i get the help i need asap…
Myself and my partner in this project have to create a game that deals with an issue of global warming… we have done that, and now we are coding it but we are having massive trouble getting our character to stop moving once he hits a wall… to move our character we are using the arrow keys on the keyboard… again, we need a reply and a possible solution as soon as possible…