SCRATCH
APP – FOLLOW
MOUSE CURSOR
DESCRIPTION
For this
application, you will make your sprite follow the mouse cursor around the
screen.
STEPS
Since this is
likely one of your first Scratch applications, we will go over the steps in
details.
STEP 0 – NEW APPLICATION
- You need to start with a new
application. So choose File >
New. Of course, you need to save
any previous work beforehand or it will be lost.
STEP 1 – THE GREEN FLAG EVENT
- Like most programs, we will start
with the When green flag clicked block. Drag it in.
STEP 2 – MOVE TO MOUSE CURSOR
- In the Motion statements, you
will find go to (mouse-pointer). Note that it might initially say go to (random position) and you can
alter it. Drag it in under the
code block.
STEP 3 – FOREVER
- We actually want this to repeat
forever. So we add a forever control block. The go
to block (from Step 2) needs to be placed inside this
block.
Now,
Scratch will continually move the sprite to the location of the mouse.
STEP 4 – TEST YOUR PROGRAM
- Test your program. Your sprite should follow the mouse.
|