Wall HitTest

Does anyone know of a good wall hitTest method? Everything i tried either allows the player to walk through walls in the corners or i would have to do the same code over and over for each wall, which is really annoying…

I can post an example .fla later if anyone wants to see what I am using now.