Click to move boundaries

Hi!
I followed this tutorial on how to move a movieclip with a mouseclick
Tutorial- http://www.kirupa.com/developer/mx/easing_mouseclick.htm

I was wondering how to make boundaries
E.g theres a wall if i click on the wall the movieclip cant go through the wall