Boundry

In Flash how do I make it so that wken a charcter walk’s into a wall from any side the wall stops him.