Character hit wall question

This oughta be a simple question really.
I have a character that are moveable with the arrow keys. And an area for that character to move inside. Just outside of that area I have walls. So if the character moves outside the area (and on the walls) it will “die”. Basicly, if you go outside the “safe area” and hit the walls, you will be send to a new frame. A “game over” frame.

Instance name of character: character
Instance name of walls: walls

I want to have the code in one actions frame if possible, not on any of the objects.

peace:)