My inability to code collision detection

Okay, I’ve now tried programming about 4 games in flash and because of my bad understanding of collision detection, I always give up.
Please, will someone either help me out or link me to a good site for coding games in AS3?

My situation:
I have a tank class (movieclip), which has a listener on it for enter_frame. The listener calls update, which increases the x by vx and y by vx. Cool.
I am generating ‘walls’ (wall class, also movieclip), which happens in the TankGame class (my main stage’s class is linked to it).

When the walls are generated, I put them into an Array ‘walls’, and when I create an instance of the Tank, I pass it’s constructor the array of walls (so the tank knows about what it can collide into).
In the update function, I’m trying to make it so if hitTest between the tank and any of the walls is true, it won’t move. But this causes my tank to get stuck inside a wall…

What is the way that people normally approach this? I see many games online made in AS3…