Collision detection for a player with walls.. ahh!

I’m trying to code collision detection for my player and walls.
I have the wall objects stored in an array, and I currently have my code so I have an event listener for enter_frame on the stage. The function I have is this:

function onEnterFrame(event:Event){
for(var i:int;i<collisionObjects.length;i++){
if(player.hitTestPoint(collisionObjects*.x, collisionObjects*.y)) player.bounceBack(collisionObjects*);
}
}

The player’s bounceback code is what I need to code. I don’t know how to properly bounce back the player. The player has velocity x and velocity y, which update his position every frame. I tried sending the player back the opposite velocity for one frame, but that didn’t work as expected. How is this kind of situation normally resolved?? I also tried using hitTestObject but that had the same issue.