Scratch: A Pictoral Guide

by John Maloney

Last update: October 1, 2003




Introduction

Scratch is a multimedia construction environment for building interactive projects combining graphics, animation, sound, and video. You can build interactive stories, simple games, animated music videos, or interactive artwork. Using a special hardware interface and readily available Lego components, you can use switches and various kinds of sensors to control your creations, or you could even create a kinetic sculpture that responds to the viewer.

Like Lego or Tinkertoy, Scratch comes with a small set of building blocks that can be combined in infinite ways to make your own creations. With Lego, you sometimes run out of a particular shape or color of building block, but in Scratch you never run out of objects because you can always make new ones.

The Scratch building blocks are three basic objects: sounds, sprites, and image boxes. Sound objects let you record, edit, and play short sounds that can be used to for sound effects, character voices, or music. Sprite objects are images that can move, rotate, and change size. They are useful as characters in interactive stories or as elements in games. Image box objects can used for playing movies, manipulating still images (e.g., to create a slide show), or playing MP3 sounds.

At the heart of Scratch is a simple, drag-n-drop scripting system that let's you control the things you make. Scripts are assembled from colorful command blocks. It's very easy to get started yet there's plenty of power to handle more advanced projects as your skills improve.

Scratch is designed to be used without much instruction and certainly without a lengthy manual. Ideally, you'll have someone show you how to get started and then you'd learn on your own by exploration. However, sometimes you need a little help getting started, a reminder of where to find some feature, or a hint about how to do something more advanced. That's where this guide can help.

Enough words! On to some pictures...

Scratch Window

When you first open Scratch, you'll see this window:

Scratch Menus

To get started, make a new sprite (use the button with the cat icon), drop it into the work pane, and double-click on it. This will show the command blocks and scripts for that sprite. Here's an annotated picture of what you'll see with all the menus expanded out for easy reference:

Object Menus

Each object has its own menu which you get by clicking the right mouse button on it (or option-clicking on a Macintosh). Here are the menus for sound, sprite, and image box objects:

Scripting Overview

Scripts are created by dragging blocks from the blocks pane into the scripts pane of the object to be scripted. Blocks can be snapped together to create a sequence of commands that execute in order. A script starts with a "script hat", a purple block with the script's name and an indicator that turns green while the script is running or red if the script has an error. Click on the script hat to start or stop that script.

Some command blocks have boxes containing numbers or other data. These boxes, called "parameters", specify inputs to the command. For example, the "turn" command has a parameter that says how many degrees the sprite turns. You can change a parameter just by clicking on it and editing it. Certain kinds of parameters, such as color parameters are set interactively, for example by picking a color from a color palette.

You can also drop variable blocks or math blocks onto a parameter to use the value of that variable or the result of that math operation as the input to the command. Also, some blocks, such as "random" compute a value, just like the math blocks do. Such blocks are sometimes called "reporters". Reporter blocks can also be dropped into parameter boxes.

Command Blocks Shared by All Objects

This section describes the blocks that are shared by all the different kinds of objects.

Control Blocks

Control blocks are blocks that control the sequence or timing of other command blocks.

File Blocks

File blocks allow your script to load or save media. For example, one could make a slide show by loading a sequence of images or photos into an image box. "Save" can be used to store a pictures or sound in a file.

Math Blocks

Math blocks let you do arithmetic and other math operations.

Mouse and Keyboard Blocks

These blocks let you control things using the mouse or keyboard entry.

Testing Blocks

Testing blocks are used to compare numbers or to combine several true-or-false values.

Sprite Command Blocks and Variables

Sprites are objects that can move, rotate, and change size.

Sprite Motion Blocks

Sprite Sensing Blocks

Sprite Variables

Sound Command Blocks and Variables

Sounds objects are used for short (less than two or three minutes) sounds.

Sound Playing Blocks

Sound Variables

Image Box Command Blocks and Variables

Image box objects can hold still images, MPEG movies, or MP3 sounds. The image or movie can be panned, zoomed, or faded to a sold color (e.g. fade to black).

Image Box Movie Blocks

Image Box Variables