Sei sulla pagina 1di 15

2014

Nicola Gallop

How to use the basics of Scratch

This document is going to give a guide of how to use


the basics of the program Scratch, for Computer
Coding in the Primary National Curriculum.

Contents
What is Scratch? ................................................................................. 2
Stage area ........................................................................................... 4
Menu and tool options ....................................................................... 5
Scripts area ......................................................................................... 6
Palette area......................................................................................... 7
Sprites ................................................................................................. 8
Sprites in the Scratch interface ........................................................... 9
Creating and editing sprites .............................................................. 10
Naming a sprite ................................................................................. 11
Coloured blocks and scripts .............................................................. 12
Functions of blocks ........................................................................... 12
Flow of scripts ................................................................................... 14

What is Scratch?
Scratch is a visual programming language that provides a
rich learning environment for people of all ages. It allows you
to create interactive, media-rich projects, including animated
stories, book reports, science projects, games and
simulations. (Marji, 2014)
Scratchs visual programming environment enables you to
explore areas of knowledge that would otherwise be
inaccessible. It provides a full set of multi-media tools you
can use to create wonderful applications and you can do so
more easily than with other programming languages.
In many ways, Scratch promotes problem solving skills
important in all areas of life, not just programming. (Marji,
2014)
Scratch is a visual programming language that makes coding
simple. It can be used to make all sorts of fun and interesting
problems. (Vorderman, 2014)

Marji, M. (2014) Learn to program with Scratch. A visual introduction to programming with games, art, science and math.
USA: No Starch Press Inc.
Vorderman, C. (2014) Computing Coding for kids. London: Dorling Kindersley Limited.

Scratchs areas
Scratch has a few main areas that you have to work with. The first area is the
palette. This area allows you to select different blocks to start to programme
the sprite. The second area is where you drag the scripting blocks and edit
everything. The third area is the stage, where you view the action that you
have just programmed your sprite to do. In the fourth area, you select a sprite
to work on and view the basic information. The top area holds menus and
toolbars.

Gives you options of what type of blocks you have


available. Currently Motion is selected.

Menu and shortcuts button


Top area

This is the
stage where
you can see
what
everything
looks like.

First area
Second area

Third area

Fourth area

In the sprite area you can select a


sprite to work with.

The scripting/ costume/ sound area.

Stage area
This is Scratches screen layout, or interface. This is the stage area. This page
demonstrates what each button does.
Click for full screen view

Menu options

Change language

Cursor tools

Program name
box

Click a sprite on the


stage or in the sprite
list to select it

Blue box around


the selected
sprite
Buttons to add
new sprites

Buttons to change
the background

Menu and tool options


This box shows what the menu options do and the cursor tool options do.

Menu and tools

Menu options:
This is what the menu options at the top of the screen do.

Save work or start a new project


Undo any mistakes or change the stage
size
If you get stuck, find help here

Cursor tools:
Click on the tool you want to use and then click
on the sprite or script you want to use.
Copy a sprite or script.
Delete a sprite or script.
Enlarge a sprite.
Shrink a sprite.
Get help on a block.

Scripts area
Below demonstrates the scripts area. Each part of the scripts area is labelled
for you to become familiar with each part.
Scripts tab

Costumes tab

Sounds tab

Select different types of block

Current sprite selected

Drag blocks from here into the


scripts area to make scripts

Build scripts here

Zoom in and out


of scripts

Palette area
This is the palette area. At the top, you can select what blocks you want to
view indicated by what the button says. Below, you can drag blocks to the
scripting area to make sprites to various things. Note: puzzle piece-shaped
things mean they go above/below another block. Round or oval things (usually
with text inside them) accept numbers/values. You can either drag an oval
block into them or type a number. If there is a pull down menu, you can also
choose from that. Square areas accept text, numbers, or oval blocks. Pointy
areas accept things that are true or not true. For example, "A=B" or "touching
mouse-pointer" are a few options. Checkboxes allow its value to be shown on
the stage along with a label. Also, if you right-click on any block, whether in the
palette or in the scripting area, if you click help, a window will come up (in
Scratch) that explains what that particular block does.

You can select the type of blocks you


want to use for the programming.

Dragging this block will move your sprite you can


choose how many steps by changing the number.
These turn blocks will turn your sprite to how ever
many degrees you have set it to.

Sprites
Sprites are the basic components of Scratch. Every Scratch program is made up
of sprites and the scripts that control them.
What can sprites do?
Sprites are the images on the stage. Scripts are programmed to make them do
things. Sprites can be instructed to react to other sprites and the user of the
program. Here are a few things sprites can do:
Move around the stage

Change their
appearance

Play sounds and music

React when they touch


things
Be controlled by the
user
Talk in speech bubbles

Sprites in the Scratch interface


Each project can have several sprites, and each one can have its own scripts. It
is important to add scripts to the correct sprite, and to know how to switch
between them. A project can have lots of sprites, and each sprite can have lots
of scripts.

Select different sprites


by clicking on them

The scripts being shown belong


to the sprite shown here

Creating and editing sprites


Creating and editing sprites is simple. There are options to create copy and
delete sprites. Below is a guide how to do these simply.
To create:
Select a picture from your
computer to use for a sprite

Choose a sprite from the library

Draw to create a new sprite

Use your webcam

To copy or delete a sprite:


Right click on the sprite in the sprite list to copy a sprite and its scripts.
This option of
duplicate copies a
sprite
This option deletes
a sprite

10

Naming a sprite
It is easier to write programs if you give your sprites a meaningful name. It also
makes it easier to understand and manage scripts.

Select the sprite in the sprite list and then click the blue i button in
the corner.
The blue i icon

Change the name by clicking in the text box on the opened information
panel. Use your keyboard to change the name of the sprite.

Type the new name


of the sprites in
here

Click the blue arrow to the left of the sprite to close the information

panel.
The sprites new
name appears in
the sprite list

11

Coloured blocks and scripts


Blocks are colour coded subject on what they do. Putting the blocks together
builds scripts that run in the order in which they are placed for a sprite.
There are ten different types of blocks in Scratch. You can switch between
them using the buttons in the blocks palettes. Click on each colour to see all
the blocks in that section.
Button to show the blue Motion blocks

Functions of blocks
Different types of blocks do different things in programs. Some make sprites
move, some manage sounds and some decide when things happen.
Events and sensing:
Brown Events blocks make things happen. Light blue Sensing blocks detect
information about the keyboard, mouse and what a sprite is touching.

Detects when the green flag is clicked

Detects when the green flag is clicked

12

Motion, looks, sound and pen:


These blocks control what a sprite does on screen this is called the output of
a program.
This block rotates the sprite

This block shows a thought bubble

This block plays a sound recording

The block draws a line as a sprite moves

Data and operators:


Orange Data blocks and green Operators blocks store numbers and words
and do things with them.
This block chooses a random number.

Control:
The Control blocks make decisions about when blocks run. They can be
programmed to repeat instructions.
This makes the blocks inside it run on
loop (forever).

13

Flow of scripts
When a program runs, Scratch carries out the instructions on the blocks. It
starts at the top of the scripts and works its way down.
The instructions will start at the top
and make its way down

That is the end of the guide to the basics of Scratch. Hopefully you now feel
confident enough to move onto building a script for a sprite and then moving
to creating a game.

14

Potrebbero piacerti anche