Random Motion Code

Hi,

I am using the random motion code found here at Kirupa.

http://www.kirupa.com/developer/mx/random_motionMX.htm

I have the code working fine but I have a question about fixing it to my needs. The way it is now, you change the height and width variables so that the objects don’t move off the screen. This works fine, if you are using the whole screen area at:

width = 640
height = 480
x = 0
y = 0

What I need is the area to start at

width = 640
height = 480
x = 1
y = 1

What would I change, or should I add to the code so that the restriction area starts at x,y (1,1) instead of the defaulted (0,0)?

Thanks for the help