Beginning actionscript

hey,

i started learning some actionscript today.

here’s what i got. the problem is, i can enter the walls from the sides i only have a code for one direction for the character to stop. also, i want a hittest that if he hits the wall the score goes up. i only get a score if i enter the sides of the wall.

the man also stays in front a few pixels instead of actually hitting the wall.

another thing im asking is, how do i make it, if i attach “attached” that it doesnt hit the wall, only the black guy.

sorry if my questions are a bit confusing.

thanks in advance.