Actionscript movement

Hello everybody. Here is my problem. In attached file I have square that moves through the entire page. I used an example of the square that was posted on this website as tutorial. I was woundering if anybody knew if I am able to stop this square at certian places with actionscripting. For example x=397 and y=123. Thank you very much for the help.