Rpg game help with hittest?

hey guys, im stuck atm, i need your help, im making an rpg game atm, ive got the character moving, ive set up the walls, i need the character not to walk pass the wall, the walls are the boundaries

pleaze help

i attached the fla, to give you guys a better idea
http://www.student.cofa.unsw.edu.au/~z3162245/gamehelp.fla

cheers