You will also want to make it push you 'off' the wall.
Perhaps you could consider using physics?
Anyway, I am not sure how 'is by wall' actually works, but here's an idea if it doesn't turn out.
Put two invisible objects pinned the player like so.Image
If both of the objects are overlapping the wall, then you know you are touching a near-vertical wall.
Of course, that's all if the problem lies in 'is by wall'. Send your capx!