Limiting motion

Hi,
I have used the excellent random motion tutorial however I need a slight modification.
I would like to keep the animated objects within a box of 4 walls on my stage.

I need to limit this._x and this._y within the parameters of my 4 walls wallL, wallR, wallT and wallB.

you can probably tell I’m new to this, help a girl out please

You’ll need to set up a boundry, maybe this thread will help.

http://www.kirupaforum.com/forums/showthread.php?s=&threadid=11980&highlight=boundry