walls/boundaries?

I have a collision event causing the player to die onCollision and I want to keep the player within the screen with walls without interfering with that collision event. I need the player to be able to bounce off the walls.