Introductign to
Scratch
LEARNING OBJECTIVEs
AP RECAP
1. What do you understand Youwill learn about:
by programming language? " How to start Scratch
Components of Scratch window
How to change, move or add sounds to Sprites
2. List some programming languages Saving a project
available in the market.
Opening a new project
Exiting Scratch
dotfoduction
Scratch is a vissal programming language. It is based on a drag and drop feature
which makes it suitable to create games, animated stories and projects. Scratch
language provides in-built graphic characters which can perform actions according
to the commands given. These characters are
called Sprites. These Sprites are
similar to Turtle in Logo.
FACT FILE
Why Scratch
Scratch is used as an introductory Scratch was developed bythe Lifelong
programming language because it makes the Kindergarten Group at the MIT Media
creation of animated stories and lab, led by Mitchel Resnick in 2003.
easy task. With the help of gamesan However the first official website
blocks, skills of a of Scratch was
programming language can be learnt easily. It is a launched in 2006.
free software
128 program.
The features of Scratch are listed below.
It is available free of cost.
It is easy to learn and understand.
It is independent of an operating system.
There is no nced to write Commands: predefined blocks are
together to create the script. snapped
Sfarting aScratch
To start Scratch. double click on the the
window with the Editor screen willappear Scratch 2 application. The Scratch
Sratt2 omine Edtot (Fig 9.1).
Snnts Choiea
ensin
Opetator
Oste
meve 10 stea
tum 13) egn
Polnt toKard mousepalnter
ge ta m8use polntet
x A0 y: -180
Sprites
New sprte. /
dangn by 10
Sage Sortef
ange y 0
if on edo bounc
set rutation style left ight
psition
Fig. 9.1 Scratch window
Gomponents of a Scratch Window
Let us get familiar with the various components of the Scratch window(Fig. 9.2).
Iitle Bar: It contains the title of the application being used. Here it is
NCTatch. It is top most bar of the window.
MlenuBar: Itcontains the list of menus available for the application. They are
u drop down menus that can be accessed by the mouse or with the keyboard.
Blocks Palette: It contains the various predefined blocks that are used to
Rrform specific tasks.
129
Menubar Title bar Cursor tools Help
Scuatch2 OMnditu
oipts
Green flag Tabs
View fulI
SCreen Stop button
Blocks menu
Stage
Sprite Script Area
mavterolste
Srtes tNew sprte /o
Sprite List
Blocks palette
New Sprite taton ptylfright
button
Background dirctios
Icons
Fig. 9.2 Components of Scratch window
x and y coordinates: These coordinates indicate the position of a sprite on
the stage. The point at which the two axis meet is the centre of the
stage.
Origin is the centre of the stage where both xaxis and y axis is 0.
Tabs: There are three categories of tabsin Scratch,
Costumes and Sounds. All of them perform a specific namely Scripts,
tab, Backdrops, appears only when we select the task. An additional
in-built background. Stage icon to add any
Script Area: The collection of step wise
called a Script. The place where we pick instructions given to a Sprite is
and drop the blocks to create Script
is called a Script Area.
The Stage: It is the actual area to
where Sprite moves. The position draw or perform actions. Stage is
of the Sprite on the Stage is
the area
(x. y) coordinates. "The referred to as
the Stage. coordinates can be seen at the bottom right corner of
Green Flag: It is a feature that is used to
the project. start the execution of all
scripts in
Stop Button: It is used to stop the
execution of the block.
130
Sprite Information: Itincludes information about the selected
Current The tools include:
Sprite and as well as tools for manipulating the Sprite.
Circular ArTOW: Sprite can be rotated fully.
Arrow: It allows the Sprite to face left or right.
" Linear the Spriteso that it is fixed to
Disable Rotation: lt disables the rotation of
90 degrees.
It specifies the direction of O
Sprite Direction:
the Sprite when amove instruction is given. New sprite
from camera
Adding a New Sprite
window,by
After opening the Scratch on the stage
default the Cat Sprite appears
9.3). However we cancreate, import
(Fig. project. Upload sprite
Sprites in our
or use the available located at the
Choose sprite from file
New sprite option from library
Select the
the Stage.
bottom right corner of Sprtes
sprite from library: It contains
Choose options.
Sprite
many exciting in-built
Sorte2
Paint new
Slage Sprte1
Selecting this button sprite
Paint new sprite: / Sprite
New baadioo
Paint editor window, where a/Sprite list
willopen the (Fig. 9.4). Fig. 9.3 Adding New
Sprite
you can draw a new Sprite
Saalch 2Ottune Lgnor
Buun4s
CosuInus
Mew ostuiie
Bprts
100%
Alnp Mode
Corvat lo vecdor
131
editor window
Fig. 9.4 Paint