set the locH of sprite 2 to the locH of sprite 2 + (MGIDirH * 20)
set the locV of sprite 2 to the locV of sprite 2 + (MGIDirV * 30)
updateStage()
if the locH of sprite 2 > 640 then
set MGIDirH to -1
end if
if the locH of sprite 2 < 0 then
set MGIDirH to 1
end if
if the locV of sprite 2 > 480 then
set MGIDirV to -1
end if
if the locV of sprite 2 < 0 then
set MGIDirV to 1
end if
if (the locH of sprite 2 > 411) and (the locV of sprite 2 < 120) then
set MGIDirV to 1
end if
if (the locH of sprite 2 > 390) and (the locV of sprite 2 < 120) then
set MGIDirH to -1
end if
repeat while (the right of sprite 2 > the mouseH) and (the left of sprite 2 < the mouseH) and (the top of sprite 2 < the mouseV) and (the bottom of sprite 2 > the mouseV)