scratch reference guide 14
TRANSCRIPT
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 1/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
1
Scratch is developed by the Lielong Kindergarten Group at the MIT Media Lab, with fnancial support
rom the National Science Foundation, Microsot, Intel Foundation, Nokia, and the MIT Media Lab research
consortia.
1. INTRODUCTION
Scratch is a new programming language that makes it easy to create interactive stories,
games, and animations – and share your creations with others on the web.
Tis Reerence Guide provides an overview o the Scratch sotware. I you are just
getting started with Scratch, we encourage you to try the Getting Started Guide rst
(available rom the Support section on the Scratch website). Ten, i you want more
detailed inormation, come back to the Reerence Guide.
Te Scratch website has many other resources to help you learn Scratch: Video tutorials,
Scratch cards, and Frequently Asked Questions (FAQs). Please see
http://ino.scratch.mit.edu/Support/
Tis guide is or Scratch version 1.4, released July 2009. For the latest version o this
Reerence Guide, please see: http://ino.scratch.mit.edu/Support/
BASIC INGREDIENTS OF A SCRATCH PROJECTScratch projects are made up o objects called sprites. You can change how a sprite
looks by giving it a dierent costume. You can make a sprite look like a person or a
train or a butterfy or anything else. You can use any image as a costume: you can draw
an image in the Paint Editor, import an image rom your hard disk, or drag in an image
rom a website.
You can give instructions to a sprite, telling it to move or play music or react to other
sprites. o tell a sprite what to do, you snap together graphic blocks into stacks, called
scripts. When you click on a script, Scratch runs the blocks rom the top o the script to
the bottom.
version 1.4
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 2/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
2
2. SCRATCH INTERFACE
STAGETe Stage is where you see your stories, games, and animations come to lie. Sprites move andinteract with one another on the Stage.
Te Stage is 480 units wide and 360 units tall. It is divided into an x-y grid. Te middle o the
Stage has an x-coordinate o 0 and a y-coordinate o 0.
o nd out x-y positions on the Stage, move the mouse
(cursor) around and look at the mouse x-y display just
below the Stage.
Click the Presentation Mode button when you want to present your project. o exit
Presentation Mode, press the Esc key.
Click the View Mode buttons to switch between small and large stage view. You can
use small stage view to display Scratch on small screens or to expand the Scripts Area.
x
x:240 :180
x:240 :180
x:240 :180
x:240 :180
x:0 :0
LANGUAGE
TABSEdit scripts,
costues, or sounds.
GREEN FLAG
A wa to start scripts.
STAGE
Where our Scratch
creations coe to lie.
NEW SPRITE BUTTONS
Create a new character or
object or our project.
SPRITE LIST
Thubnails o all our
sprites. Clic to select and
edit a sprite.
SCRIPTS AREA
Drag blocs in, snap the
together into scripts.
BLOCkS PALETTE
Blocs or
prograing
our sprites.
CURRENTSPRITE
INFO
TOOLBAR PRESENTATION mODEPresent our project.
SPRITEROTATION
STyLE
VIEW mODEChange to large or
sall stage view.
STOP SIGN
Stops all scripts.
SAVE
SHARE
mOUSE X-y DISPLAy
Shows location o cursor.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 3/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
3
NEW SPRITESWhen you start a new Scratch project, it begins with a single cat sprite.
o create new sprites, click on these buttons:
Paint your own costume or a new sprite using the Paint Editor.
Select a costume or a new sprite – or import an entire sprite.
Get a surprise sprite.
I you want to delete a sprite, select the scissors rom the oolbar and click on the sprite.
Or right-click (Mac: Ctrl+click) on the sprite and select delete rom the pop-up menu.
o make a sprite that looks like part o the Stage background, right-click (Mac: Ctrl+click)
the Stage and select grab screen region or new sprite.
SPRITE LISTTe Sprite List displays thumbnails or all sprites in a project. Te name o each sprite
appears below its thumbnail.
o see and edit a sprite’s scripts, costumes, and sounds, click on the sprite’s thumbnail
in the Sprite List – or double-click on the sprite itsel on the Stage. (Te selected sprite is
highlighted and outlined in blue in the Sprite List.)
o show, export, duplicate, or delete a sprite, right-click (Mac: Ctrl+click) on the sprite’s
thumbnail in the Sprite List. o show a sprite that is o the Stage or hidden, Shit+click
on the sprite’s thumbnail in the Sprite List - this will bring the sprite to the middle o theStage and show it.
You can rearrange the sprites in the Sprite List by dragging the thumbnails.
Just as a sprite can change its appearance by switching costumes, the Stage can change
its appearance by switching backgrounds. o see and edit the scripts, backgrounds, and
sounds associated with the Stage, click on the Stage icon at the let o the Sprite List.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 4/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
4
BLOCkS PALETTE and SCRIPTS AREAo program a sprite, drag blocks rom the Blocks Palette to the Scripts Area. o run a
block, click on it.
Create scripts (programs) by snapping blocks together into stacks. Click anywhere on the
stack to run the whole script, rom top to bottom.
o nd out what a block does, right-click (Mac: Ctrl+click) on it, then select help rom the pop-
up menu.
When you drag a block around the Scripts Area, a white highlight indicates where you can
drop the block and orm a valid connection with another block.
o move a stack, pick it up rom the top block. I you drag out a block rom the middle o a
stack, all o the blocks beneath it will come along with it. o copy a stack o blocks rom one
sprite to another, drag the stack to the thumbnail o the other sprite in the Sprite List.
Some blocks have white editable text elds inside, such as . o change the value,
click inside the white area and type in a number. You can also drop rounded blocks, like
, inside these areas.
Some blocks also have pull-down menus, such as . Click on the to see the
menu.
o clean up the Scripts Area, right-click (Mac: Ctrl+click) and select clean up rom the menu.
o export a screenshot o the Scripts Area, right-click and select save picture o scripts.
o add a comment to the Scripts Area, right-click (Mac: Ctrl+click) and select add comment. A
yellow comment area will appear, and you can type in text.
o resize the width o the comment area, use the handle on the right edge. Click the triangleat the top-let to collapse or expand the comment area.
Comments can be added anywhere in the Scripts area, and you can move them around by
dragging them.
o attach a comment to a block, drag the comment on top o the block. o detach the
comment, drag the comment away rom the block.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 5/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
5
COSTUmESClick the Costumes tab to see and edit the sprite’s costumes.
Tis Sprite has two costumes. Te sprite’s current costume (girl1-walking) is highlighted. o
switch to a dierent costume, simply click on the thumbnail o the costume you want.
Tere are our ways to create new costumes:
•ClicktopaintanewcostumeinthePaintEditor.
•Clicktoimportanimagelefromyourharddisk.
•Clicktotakephotosfromawebcam(builtintoorconnectedtoyourcomputer).
Each time you click the button (or press the spacebar), it takes a photo.
•Draginoneormoreimagesfromtheweboryourdesktop.
Scratch recognizes many image ormats: JPG, BMP, PNG, GIF (including animated GIF).
Each costume has a costume number (displayed to its let). You can rearrange the order o the
costumes by dragging the thumbnails. Te costume numbers update i you change their order.
Right-click (Mac: Ctrl+click) on a costume thumbnail to convert the costume into a new sprite, or
to export a copy o the costume as a separate le.
SOUNDSClick the Sounds tab to see the sprite’s sounds.
You can record new sounds or import sound les. Scratch can read MP3 les and uncompressed
WAV, AIF, and AU les (encoded with 8-bits or 16-bits per sample, but not 24-bits per sample).
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 6/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
6
CURRENT SPRITE INFO
Current Sprite Info shows a sprite’s name, x-y position, direction, lock state, and pen state.
You can type in a new name or the sprite.
Te sprite’s direction indicates which direction the sprite will move when it runs a move block
(0=up, 90=right, 180=down, -90=let). Te blue line on the thumbnail shows the sprite’s direction.
Youcandragthislinetochangethesprite’sdirection.Double-clickonthethumbnailtosetthedirection back to its original state (direction=90).
Click the Lock to change the sprite’s lock state. An unlocked sprite can be dragged in presentation
mode and the web player.
You can see the current pen color (next to the Lock) when the pen is down.
o export a sprite, right-click (Mac: Ctrl+click) the sprite on the Stage or in the Sprite List.
Exporting saves the sprite as a .sprite le, which can then be imported into another project.
ROTATION STyLEClick the Rotation Style buttons to control how the costume appears as the sprite changes its
direction.
Rotate: Te costume rotates as the sprite changes direction.
Let-right fip: Te costume aces either let or right.
No-rotate: Te costume never rotates (even as the sprite changes direction).
TOOLBAR
Click on the Toolbar to select a tool, then click on other objects to perorm an action.
Duplicate:Duplicatesprites,costumes,sounds,blocks,orscripts.(Shift+clickformultiple.)
Delete:Deletesprites,costumes,sounds,blocks,andscripts.(Shift+clickformultiple.)
Grow: Make sprites bigger. (Shit+click or larger size steps.)
Shrink: Make sprites smaller. (Shit+click or larger size steps.)
o return to the arrow cursor , click on any blank area o the screen.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 7/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
7
mENU
Click the Language icon to change the language or the Scratch user interace. Anyone
can add or edit language translations o Scratch. o add or change a translation, please
reer to the Support section o the Scratch website (http://ino.scratch.mit.edu/Translation/ ).
Click the Save icon to save your project.
Click the Share icon to upload your project to the Scratch website.
From the File menu you can create a new project, open an existing project, and save
projects to the Scratch Projects older or to other locations.
Import Project brings all o the sprites and backgrounds rom another project into the
current project. Tis eature is useul or combining sprites rom multiple projects.
Export Sprite saves the current sprite as a .sprite le, which can then be imported into
another project.
Project Notes allows you to write and save notes about your project, such as
instructions on how to use it.
Quit exits the Scratch program.
Te Edit menu provides several eatures or editing the current project.
Undelete allows you to retrieve the last block, script, sprite, costume, or sound you
deleted.
Start Single Stepping allows you to watch Scratch programs run one step at a time. Each
block is highlighted as it runs. Tis eature can be useul or nding bugs in programs,
and or helping new programmers understand the fow o a program. Set Single
Stepping allows you to choose the speed o single stepping (rom slow to turbo speed).
Compress Sounds or Compress Images to reduce the overall project le size. Compressing
may reduce the quality o the sounds or images.
Show Motor Blocks adds motor blocks to the Motion category. You can use the motor
blocks to program a motor connected to your computer. Te motor blocks work with
LEGO®EducationWeDo™(http://www.legoeducation.com).
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 8/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
8
From the Share menu you can upload your project to the Scratch website.
From the Help menu you can access a Help page with links to reerence materials, tutorials,and requently asked questions. You can also access a page with all the Scratch help screens.
GREEN FLAGTe Green Flag provides a convenient way to start many scripts at the same time.
Click the Green Flag (at the top-right corner o the stage) to start all scripts that have
at the top.
Te Green Flag remains highlighted while scripts are running.
In Presentation Mode, pressing the Enter key has the same eect as clicking the Green Flag.
On the Scratch website, as soon as you view a project, the Green Flag is automatically
triggered.
PAINT EDITORYou can use the Paint Editor to create or edit costumes and backgrounds.
TOOLBAR
OPTIONS AREA
CANVAS
UNDO/REDO
CLEAR
Erase canvas.
SCALE BUTTONS
Change size o
current selection.
ROTATE BUT TONS
Rotate current
selection.
FLIP BUTTONS
Flip current selection
horizontall or verticall.
CURRENT COLORS
COLOR PALETTE
Pic the current colors.
ImPORT ImAGE
SET COSTUmE
CENTER
ZOOm
ALTERNATE PALETTE
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 9/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
9
Te Paint Editor Toolbar has the ollowing tools:
Paintbrush: Paint reehand using the current oreground color. When you click on this
tool, the Options Area shows the brush size. Click to pick a dierent brush size.Eraser: Erase with reehand strokes. Te areas that you erase become transparent. When
you click on this tool, the Options Area shows the eraser size. Click to pick a dierent
eraser size.
Fill: Fill connected areas with a solid color or gradient. When you click this tool, the
Options Area shows the ll style (solid color, horizontal gradient, vertical gradient, or radial
gradient). Gradients blend rom the selected oreground color to the selected background
color.
Rectangle: Drawalledoroutlinedrectangle(Shift+dragforasquare)usingthecurrent
oreground color. When you click this tool, the Options Area shows the ll style (solid or
outlined ). Te outline thickness is determined by the paintbrush size.Ellipse:Drawalledoroutlinedellipse(Shift+dragforacircle)usingthecurrent
oreground color. When you click this tool, the Options Area shows the ll style (solid or
outlined ). Te outline thickness is determined by the paintbrush size.
Line:Drawastraightline(Shift+dragforahorizontalorverticalline)usingthecurrent
oreground color. When you click on this tool, the Options Area shows the brush size.
Click to pick a dierent brush size.
Text: Add text to the drawing. When you click on this tool, the Options Area allows you to
change the ont ace and ont size. Each costume can only have one block o text.
Selection: Select a rectangular region, then move it to a new location (press delete to
remove the selection, Shit+delete or Shit+backspace to crop).Stamp: Select a rectangular region, then copy it to new locations (Shit+click+drag or
repeated stamping).
Eyedropper: Use the tip o the eyedropper to choose the oreground color (click on the
Canvas and drag the eyedropper to pick a color rom outside the Canvas).
Te Current Colors (oreground and background) are shown below the Options Area. You can
click the color swap arrow to exchange the oreground and background colors. Click in the Color
Palette to pick a new oreground color (Shit+click to select a background color). o switch
between the deault palette and the continuous color palette, click the Alternate Palette.
Click the Set Costume Center button to select the location within the drawing that will be used
as the center o rotation when the Costume is rotated on the Stage.
Click the Zoom buttons (in or out) to increase or decrease the view magnication o the Canvas.
When the zoom is greater than 100%, scroll bars are used to pan around the Canvas. Zoom does
not change the size o the image.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 10/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
10
o change the size o the Canvas content, or just the current selection, click on the Scale buttons
(grow or shrink). You can Shit+click on the buttons to enter a precise value. Shrinking decreases
the size and resolution o the image.
o rotate the Canvas content, or just the current selection, click on the Rotate buttons (counter-
clockwise or clockwise). You can Shit+click on the buttons to enter a precise value.
o fip the Canvas content, or just the current selection, click on the Flip buttons (horizontal or
vertical).
Click on the Import button to open an image rom le and add it to the Canvas.
Click the Clear button to remove all content rom the Canvas.
I you make a mistake, you can click the Undo button repeatedly to undo the last several actions.
I you change your mind, you can click the Redo button to restore the undone actions.
3. SCRATCH BLOCkS
TyPES OF BLOCkSTere are three main types o blocks in the Blocks Palette:
Stack Blocks: Tese blocks have bumps on the bottom and/or notches on the top, suchas . You can snap these blocks together into stacks. Some stack blocks have an input
area inside them, where you can type a number (such as 10 in the block) or
choose an item rom a pull-down menu (such as pop in the block). Some
stack blocks, such as , have a C-shaped “mouth” where you can insert other
stack blocks.
Hats: Tese blocks have rounded tops, such as . Tese blocks are placed
at the tops o stacks. Tey wait or an event to happen, such as a key being pressed, then
run the blocks underneath them.
Reporters: Tese blocks, such as and , are designed to t in the input
area o other blocks. Reporters with rounded ends (such as or ) report numbers
or strings, and t in blocks with rounded or rectangular holes (such as or ).
Reporters with pointed ends (such as ) report boolean values (true or alse) and t inside
blocks with pointed or rectangular holes (such as or ).
Click on any reporter block to see its current value.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 11/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
11
Some reporter blocks have a check box next to them, such as . I you click in the check
box, a monitor appears on the stage, displaying the current value o the reporter. As the value
o the reporter changes, the monitor updates automatically. A monitor can display the value o the reporter in several dierent ormats:
a small readout with the name o the reporter
a large readout without any name
a slider that allows you to manipulate the value
o the reporter (available only or variables)
Double-clickorright-click(Mac:Ctrl+click)onamonitortochangefromoneformattoanother.
Te slider ormat is available only or user-created variables. Right-click (Mac: Ctrl+click) on themonitor in slider ormat to adjust its minimum and maximum values.
LISTSYou can now create and manipulate lists in Scratch. Lists can store numbers as well as strings o
letters and other characters.
o create a list, go to the Variables blocks category and click . Once you make a
list,severallistblockswillappear.TelistblocksaredescribedintheBlockDescriptionssection
o this guide.
When you create a list, a list monitor will appear on the stage. A list monitor shows all the items
in a given list. You can type items directly into a list monitor.
At rst the list will be empty, with length 0. o add to the list, click the + button on the bottom
let o the list monitor. Te length will increase by 1. Alternatively, you can add to the list using
the list blocks (e.g., ).
You can resize the list monitor rom the bottom right-hand corner.
Note: You can right-click (Mac: Ctrl+click) on a list monitor to export a list to a plain .txt le.
You can also import any saved plain .txt les with values on separate lines.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 12/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
12
STRINGSStrings are made o letters, words, or other characters (e.g., apple; October 2009; You win!).
Strings can be stored in variables or lists (such as or ).
You can join together strings using . You can compare strings using the ollowing
blocks: , , or .
Strings are evaluated as 0 in mathematical operation blocks (such as: ) and in blocks
that expect a number (such as and ).
kEyBOARD INPUT
You can use to prompt a user to type in a response on the keyboard. Teresponse is stored in . Te question appears on the screen and the program waits until
the Enter key is pressed or the check mark is clicked.
The question appears in a voice The question appears at the botto o
balloon when used in a sprite. the screen when used in the Stage.
is shared by all sprites (global) and is changed each time runs. I you
want to save the current answer, you can store it in a variable or list, such as:
BLOCk DESCRIPTIONSTe Scratch blocks are organized into eight color-coded categories: Motion, Looks, Sound,
Pen, Control, Sensing, Operators, and Variables.
motion
Moves sprite orward or backward.
Rotates sprite clockwise.
Rotates sprite counterclockwise.
Points sprite in the specied direction. (0=up, 90=right,
180=down, 90=let)
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 13/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
13
Points sprite toward mouse-pointer or another sprite.
Moves sprite to specied x and y position on Stage.
Moves sprite to the location o the mouse-pointer
or another sprite.
Moves sprite smoothly to a specied position over
specied length o time.
Changes sprite’s x-position by specied amount.
Sets sprite’s x-position to specied value.
Changes sprite’s y-position by specied amount.
Sets sprite’s y-position to specied value.
urns sprite in opposite direction when sprite touches
edge o Stage.
Reports sprite’s x-position. (Ranges ro 240 to 240)
Reports sprite’s y-position. (Ranges ro 180 to 180)
Reports sprite’s direction. (0=up, 90=right, 180=down, 90=let)
mOTOR BLOCkSTe motor blocks only appear i you choose Show Motor Blocks in the Edit menu or i you plug in a
LEGOWeDo.TeseblocksworkwithaLEGOWeDomotor.(Seehttp://www.legoeducation.com)
urns motor on or specied amount o time.
urns motor on.
urns motor o.
Sets power o motor and turns motor on. (Ranges ro 0 to
100)
Sets or changes direction o motor, but does not turn
motor on. (this wa = clocwise; that wa = counterclocwise; reverse =
change direction)
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 14/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
14
Loos
Changes sprite’s appearance by switching to dierentcostume.
Changes sprite’s costume to next costume in the cos-
tume list. (I at end o the costue list, jups bac to rst costue.)
Reports sprite’s current costume number.
Changes Stage’s appearance by switching to a dierentbackground.
Changes Stage’s background to next background in
the background list.
Reports Stage’s current background number.
Displayssprite’sspeechbubbleforspecified amount o time.
Displayssprite’sspeechbubble. (you can reove speech bubble
b running this bloc without an text.)
Displayssprite’sthoughtbubbleforspecied amount o time.
Displayssprite’sthoughtbubble.
Changes a visual eect on a sprite by specied amount.(Use pulldown enu to choose efect.)
Sets a visual eect to a given number. (most visual efects range
ro 0 to 100.)
Clears all graphic eects or a sprite.
Changes sprite’s size by specied amount.
Sets sprite’s size to specied % o original size.
Reports sprite’s size, as % o original size.
Makes sprite appear on the Stage.
Makes sprite disappear rom the Stage. (When sprite is
hidden, other sprites cannot detect it with touching?bloc.)
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 15/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
15
Moves sprite in ront o all other sprites.
Moves sprite back a specied number o layers, so thatit can be hidden behind other sprites.
Sound
Starts playing a sound, selected rom pull-down menu,and immediately goes on to the next block even assound is still playing.
Plays a sound and waits until the sound is nishedplaying beore continuing with next block.
Stops playing all sounds.
Plays a drum sound, selected rom pull-down menu, orspecied number o beats.
Plays a musical note (higher nubers or higher pitches) or speci-ed number o beats.
Rests (plays nothing) or specied number o beats.
Sets the type o instrument that the sprite uses or
play note blocks. (Each sprite has its own instruent.)
Changes sprite’s sound volume by specied amount.Volue ranges ro 0 to 100.
Sets sprite’s sound volume to specied value.
Reports sprite’s sound volume.
Changes sprite’s tempo by specied amount.
Sets sprite’s tempo to specied value in beats perminute.
Reports sprite’s tempo in beats per minute.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 16/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
16
Pen
Clears all pen marks and stamps rom the Stage.
Puts down sprite’s pen, so it will draw as it moves.
Pulls up sprite’s pen, so it won’t draw as it moves.
Sets pen’s color, based on choice rom color picker.Picing the color also changes the pen shade.
Changes pen’s color by specied amount.
Sets pen’s color to specied value. (pen_color=0 at red end o
rainbow, pen_color=100 at blue end o rainbow. Ranges ro 0 to 200 to goaround the color wheel.)
Changes pen’s shade by specied amount.
Sets pen’s shade to specied amount. (pen_shade=0 is ver
dar, pen_shade=100 is ver light. Deault is 50, unless set with color picer.)
Changes pen’s thickness.
Sets pen’s thickness.
Stamps sprite’s image onto the Stage.
Control
Runs script below when green fag is clicked.
Runs script below when specied key is pressed.
Runs script below when sprite is clicked.
Waits specied number o seconds, then continues
with next block.
Runs the blocks inside over and over.
Runs the blocks inside a specied number o times.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 17/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
17
Sends a message to all sprites, then continues with thenext block without waiting or the triggered scripts.
Sends a message to all sprites, triggering them to
do something, and waits until they all nish beore
continuing with next block.
Runs script below when it receives specied broadcast
message.
Continually checks whether condition is true; when-
ever it is, runs the blocks inside.
I condition is true, runs the blocks inside.
I condition is true, runs the blocks inside the if por-
tion; i not, runs the blocks inside the else portion.
Waits until condition is true, then runs the blocks
below.
Checks to see i condition is alse; i so, runs blocks
inside and checks condition again. I condition is true,
goes on to the blocks that ollow.
Stops the script.
Stops all scripts in all sprites.
Sensing
Reports true i sprite is touching specied sprite, edge,or mouse-pointer. (Select ro pulldown enu.)
Reports true i sprite is touching specied color. (Clic on
color patch, then use eedropper to select color.)
Reports true i rst color (within sprite) is touchingsecond color (in background or another sprite). (Clic on
color patch, then use eedropper to select color.)
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 18/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
18
Asks a question on the screen and stores keyboard
input in the . Causes the program to wait untilthe Enter key is pressed or check mark is clicked.
Reports keyboard input rom the most recent use o
. Shared b all sprites (global).
Reports the x-position o mouse-pointer.
Reports the y-position o mouse-pointer.
Reports true i mouse button is pressed.
Reports true i specied key is pressed.
Reports distance rom the specied sprite ormouse-pointer.
Sets the timer to zero.
Reports the value o the timer in seconds. (The tier is
alwas running.)
Reports a property or variable o another sprite.
Reports the volume (rom 1 to 100) o sounds detectedby the computer microphone.
Reports true i computer microphone detects a soundvolume greater than 30 (on scale o 1 to 100).
Reports the value o specied sensor. To use this bloc, ou
need a sensor connected to our coputer. you can use this with a Scratch sensor
board (http://www.plaulinvention.co/picoboard.htl) or with LEGO® WeDo™
(http://www.legoeducation.co).
Reports true i specied sensor is pressed. To use this bloc,
ou need to have a Scratch sensor board connected to our coputer. (See http://
www.plaulinvention.co/picoboard.htl)
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 19/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
19
Operators
Adds two numbers.
Subtracts second number rom rst number.
Multiplies two numbers.
Dividesrstnumberbysecondnumber.
Picks a random integer within the specied range.
Reports true i rst value is less than second.
Reports true i two values are equal.
Reports true i rst value is greater than second.
Reports true i both conditions are true.
Reports true i either condition is true.
Reports true i condition is alse; reports alse i
condition is true.
Concatenates (combines) strings.
Reports the number o letters in a string.
Reports the letter at the specied position in a string.
Reports result o selected unction (abs, sqrt, sin, cos, tan, asin,
acos, atan, ln, log, e^, 10^) applied to specied number.
Reports remainder rom division o rst number bysecond number.
Reports closest integer to a number.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 20/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
20
Variables
Click to create and name a new variable. When ou create a
variable or the rst tie, the variable blocs will appear. you choose whether the
variable is or all sprites (global) or just or one sprite (local).
Deletesallblocksassociatedwithavariable.
Reports value o the variable.
Changes the variable by specied amount. I ou have ore
than one variable, use the pulldown enu to select the variable nae.
Sets the variable to specied value.
Shows the variable monitor on the stage.
Hides the variable monitor so it is not visible on thestage.
Click to create and name a new list. When ou create a list or
the rst tie, the list blocs will appear. you can choose whether the list is or all
sprites (global) or just or one sprite (local).
Deletestheblocksassociatedwiththelist.
Reports all the items in the list. (The ites are separated b
spaces. However, i the ites are individual letters or digits, spaces are oitted.)
Adds the specied item to the end o the list. The ite can
be a nuber or a string o letters and other characters.
Deletesoneorallitemsfromalist.you can speci which ite
to delete b choosing ro the pulldown enu or tping in a nuber. Choosing
“last” deletes the last ite in the list. Choosing “all” deletes everthing ro thelist. Deleting decreases the length o the list.
Inserts an item at the specied position in the list. you
can speci where to insert the ite b choosing ro the pulldown enu or
tping in a nuber. Choosing “an” inserts at a rando place in the list. Choosing
“last” adds the ite to the end o the list. The length o the list increases b 1.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 21/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
21
Replaces an item in the list with the specied value.
you can speci which ite to replace b choosing ro the pulldown enu ortping in a nuber. Choosing “an” replaces a rando ite in the list. The length
o the list does not change.
Reports the item at the specied position in the list. you
can speci which ite to report b choosing ro the pulldown enu or tping
in a nuber. Choosing “an” reports a rando ite in the list.
Reports how many items are in the list.
Reports true i the list contains the specied item. The
ite ust atch exactl to report true.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 22/23REFERENCE GUIhttp://scratch.it.edu
REFERENCE GUIDE
22
4. APPENDIX
SySTEm REQUIREmENTS FOR SCRATCH VERSION 1.4Computer OS:
Windows XP, Windows 2000, Windows Vista
Mac OS X 10.4 or later
Display: 800x480 or larger, thousands or millions o colors (16-bit color or greater).
Disk: At least 120 megabytes o ree space to install Scratch
Note: Scratch comes with a large media library and a collection o Sample projects. I you have
very limited disk space, you can delete the Media and Projects olders rom the Scratch older.
Memory: Most computers have enough memory to run Scratch. Older computers may run
Scratch slowly.
Sound: o take advantage o sound ouput and input, you need speakers (or headphones) and a
microphone. Many laptops have speakers and microphones built in.
CHANGING DEFAULT SETTINGSDefault Sprite
Te deault sprite or new projects is the Scratch cat. o use a dierent sprite as the deault,export the sprite, rename the exported le as deault.sprite, and place it in the Costumes older.
o replace only the deault costume, place an image le called deault.jpg (or .png or .bmp or .gi)
in the Costumes older.
Disabling Sharing to Website
In some cases, you may not want users to upload their Scratch projects online at all. Adding the
ollowing line to the le Scratch.ini will hide the “Share” menu and button:
Share=0
Default Language
Scratch starts using the language specied by the “locale” o the computer, but this can be
overridden. In the Scratch.ini le, add the line:
Language = [ISO-639-2 code]
Note that this setting will be changed whenever the user changes the language setting (i the
Scratch.ini le is writeable) so that Scratch will start up in the language that was last in use.
8/7/2019 Scratch Reference Guide 14
http://slidepdf.com/reader/full/scratch-reference-guide-14 23/23
REFERENCE GUIDE
Default Project Notes
By deault, the Project Notes in a Scratch project are blank. I you want to provide questions
or instructions whenever users rst edit a project’s notes, you can create a deault ProjectNotes le. Simply make a text le with your deault notes, save it with UF8 encoding, name it
deaultNotes.txt, and put it into the Scratch older.
I the user does not edit the deault notes, then nothing is saved in the Project Notes. Te user
has to change at least one character or the notes to be saved in the project.
NETWORk AND DRIVE SETTINGSCustomizing the Default Home Folder
By deault, Scratch assumes the user’s home older is on the local C: drive. However, in
networked settings, users’ olders are oten kept on a networked drive. Adding this line to theScratch.ini le:
Home=J:\MySchool\Students\Grade5\*
will tell Scratch that user olders are kept in the older J:\MySchool\Students\Grade5\. Note
that the asterisk is replaced by the name o the user who is logged in. You may omit the asterisk
i you want all users to share the same older or their Scratch projects.
Visible Drives
In network Windows settings, it is sometimes useul to limit which drives are visible to the
user. Tis can by done by adding a line such as:
VisibleDrives=J:,M:
to the Scratch.ini le.Lettered drive names must end in a colon, and the drive names must be
separated by commas. I visible drives are set, users will not be able to see any other drives
(including USB drives), and they won’t be able to navigate up the le hierarchy to parts o the
disk outside o the Scratch older and their home older.
Proxy Servers
Proxy server settings can be specied in the Scratch.ini le using the ollowing entries:ProxyServer=[server name or IP address]
ProxyPort=[port number]
FURTHER INFORmATIONFor more inormation and updates on network installation and customization, please see:
http://ino.scratch.mit.edu/Network_Installation