Starting with AI

In flash, i want to check if a movieclip’s x and y values are close to a walls.

edit\

How do you find ranges, like this x position to this x position?