Hardware Reference
In-Depth Information
Figure 10-4:
he Hello World
program
executing in
Scratch
Example 2: Animation and Sound
While Hello World is a very traditional example, it's not particularly interesting. It also fails
to show of the true power of Scratch, which lies in its impressive multimedia capabilities
and sprite-handling system. his system is particularly well suited to simple animations,
which can form the basis of an interactive game.
To begin, start a new project in Scratch by either loading the program afresh or choosing
New from the File menu. As with any starter project, Scratch will provide a default sprite—
it's this sprite that you will be controlling.
To control a simple animation in Scratch, you use the Motion section of the blocks palette. When
you start a new project, this is the default palette. Drag the block labelled move 10 steps to the
Scripts area. As its name suggests, this block tells the selected sprite to move 10 steps in the direc-
tion it is currently facing. he default sprite in Scratch is always started facing directly to the
right—thus, the move 10 steps block will move the sprite 10 steps to the right.
Search WWH ::




Custom Search