This Scratch code shows a Ghost moving in towards the object Dan. It also has Dan moving to a random place when the background loads.