Вы находитесь на странице: 1из 14

Scratch: Imagine, Program, Share

Thursday, February 25, 2010 10:00-12:30

ICE Conference St. Charles, IL

Michelle Russell Judith Epcke

Kildeer CCSD 96 Northbrook District 28
mrussell1211@yahoo.com jepcke@gmail.com
2/4!4)/.349,% 4!"3
#522%.4302)4%).&/ 4//,"!2 !WAYTOSTARTSCRIPTS


",/#+30!,%44% COMETOLIFE


3#2)043!2%! 02%3%.4!4)/.-/$% 302)4%,)34

People have access to an incredible variety of media. Coding in Scratch is much easier than
interactive games, stories, animations, in traditional programming languages: to
simulations, and other types of dynamic, create a script, you simply snap together
interactive media on their computers today. graphical blocks, much like LEGO bricks or
But, for the most part, these programs are a puzzle pieces.
one-way street: you can only browse and click
what others have created; you can’t design
and create your own.

Scratch changes that, broadening the range

of what you can design and create on the
computer, making it easier to combine
graphics, photos, music, and sound into
interactive creations. With Scratch, you can
create characters that dance, sing, and
interact with one another. Or create images Once you’ve created a Scratch project, you
that whirl, spin, and animate in response to can share it on the Scratch website, the same
movements of the mouse. Or integrate images way you might share videos on YouTube or
with sound effects and music clips to create an photos on Flickr. Or you can embed your
interactive birthday card for a friend, or an Scratch project in any other webpage – for
interactive report for school. example, embedding an interactive Scratch
animation on your MySpace or Facebook
The name Scratch comes from the homepage.
scratching technique used by hip-hop disc
jockeys, who spin vinyl records back and forth You can get new ideas for Scratch projects by
with their hands to mix music clips together in browsing through projects on the Scratch
creative ways. You can do something similar website. If you like one of the characters or
with Scratch, mixing different types of media images or scripts in another project, simply
clips (graphics, photos, music, sounds) in download the project and use parts of it in
creative ways. your own Scratch project.

At the core of Scratch is a graphical Below are snapshots from projects that other
programming language that lets you control people created with Scratch. What do you
the actions and interactions among different want to create with Scratch?

Lifelong Kindergarten Group, MIT Media Lab

!"#$%&'%($)&*+$(%!"#$%%#(%$"*,%-.*#$*% >"/(%;.'C*-$F&*(/3+%;.'-*((%-'29/+*(%2#+,%'?%
/+$*.#-$/0*%($'./*(1%#+/2#$/'+(1%3#2*(1%2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$"*.(1%$"*+%.*0/(*%#+&%.*&*(/3+%/$<%D$E(%#% 8"2"$"%*"0+
-'+$/+)')(%(;/.#8A%3*$%#+%/&*#1%-.*#$*%#%;.'C*-$1% "$$;AOO444<2*&/#<2/$<*&)OP2.*(O;#;*.(O4*?<;&?%
4"/-"%8*#&(%$'%+*4%/&*#(1%4"/-"%8*#&%$'%+*4% %
M*#.+/+3%?'.%$"*%QR %H*+$).,%S"$$;AOO444<QR($-*+$).,(B/88(<'.3OT%

Most people view computer programming as • Sharing and collaboration. The Scratch
a tedious, specialized activity, accessible only website provides inspiration and audience:
to those with advanced technical training. And, you can try out other people’s projects, re-
indeed, traditional programming languages like use and adapt their images and scripts, and
Java and C++ are very difficult for most people post your own projects. The ultimate goal is
to learn. to develop a shared community and culture
around Scratch.
Scratch, a new graphical programming
language, aims to change that. Scratch takes
advantage of advances in computing power
and interface design to make programming
more engaging and accessible for children,
teens, and others who are learning to
program. Key features of Scratch include:

• Building-block programming. To create

programs in Scratch, you simply snap Scratch offers a low floor (easy to get
graphical blocks together into stacks. The started), high ceiling (ability to create
blocks are designed to fit together only in complex projects), and wide walls (support for
ways that make syntactic sense, so there a wide diversity of projects). In developing
are no syntax errors. Different data types Scratch, we put high priority on simplicity,
have different shapes, eliminating type sometimes even sacrificing functionality for
mismatches. You can make changes to understandability.
stacks even as programs are running, so it
is easy to experiment with new ideas As students work on Scratch projects, they
incrementally and iteratively. have opportunities to learn important
computational concepts such as iteration,
conditionals, variables, data types, events, and
processes. Scratch has been used to
introduce these concepts to students of many
different ages, from elementary school through
college. Some students transition to traditional
text-based languages after getting introduced
• Media manipulation. With Scratch, you to programming with Scratch.
can create programs that control and mix
graphics, animations, music, and sound. Scratch is built on top of the Squeak
Scratch extends the media-manipulation programming language. It was inspired by
activities that are popular in today’s culture previous work on Logo and Squeak Etoys,
– for example, adding programmability to but it aims to be simpler and more intuitive.
Photoshop-style image filtering.
Scratch is an open-source but closed-
development project. The source code is
freely available, but the application is
developed by a small team of researchers at
the MIT Media Lab.

Lifelong Kindergarten Group, MIT Media Lab

The Scratch blocks are organized into eight color-coded categories: motion, looks, sound, pen, control,
sensing, numbers, and variables.

Moves sprite forward or backward.

Rotates sprite clockwise.

Rotates sprite counterclockwise.

Points sprite in the specified direction. (0=up, 90=right,
180=down, -90=left)

Points sprite toward mouse-pointer or another sprite.

Moves sprite to specified x and y position on Stage.

Moves sprite to the location of the mouse-pointer
or another sprite.
Moves sprite smoothly to a specified position over
specified length of time.
Changes sprite’s x-position by specified amount.

Sets sprite’s x-position to specified value.

Changes sprite’s y-position by specified amount.

Sets sprite’s y-position to specified value.

Turns sprite in opposite direction when sprite touches
edge of Stage.

Reports sprite’s x-position. (Ranges from -240 to 240)

Reports sprite’s y-position. (Ranges from -180 to 180)

Reports sprite’s direction. (0=up, 90=right, 180=down, -90=left)

http://scratch.mit.edu 11 REFERENCE GUIDE

Changes sprite’s appearance by switching to different
Changes sprite’s costume to next costume in the cos-
tume list. (If at end of the costume list, jumps back tofirst costume.)

Reports sprite’s current costume number.

Changes Stage’s appearance by switching to a different


Changes Stage’s background to next background in

the background list.

Reports Stage’s current background number.

Displays sprite’s speech bubble for specified

amount of time.
Displays sprite’s speech bubble. (You can remove speech
bubble by running this block without any text.)

Displays sprite’s thought bubble for specified

amount of time.

Displays sprite’s thought bubble.

Changes a visual effect on a sprite by specified amount.

(Use pull-down menu to choose effect.)

Sets a visual effect to a given number. (Most visual effects

range from 0 to 100.)

Clears all graphic effects for a sprite.

Changes sprite’s size by specified amount.

Sets sprite’s size to specified % of original size.

Reports sprite’s size, as % of original size.

Makes sprite appear on the Stage.

http://scratch.mit.edu 12 REFERENCE GUIDE

Makes sprite disappear from the Stage. (When sprite is
hidden, other sprites cannot detect it with touching? block.)

Moves sprite in front of all other sprites.

Moves sprite back a specified number of layers, so that

it can be hidden behind other sprites.

Starts playing a sound, selected from pull-down menu,
and immediately goes on to the next block even as
sound is still playing.
Plays a sound and waits until the sound is finished
playing before continuing with next block.

Stops playing all sounds.

Plays a drum sound, selected from pull-down menu, for

specified number of beats.

Plays a musical note (higher numbers for higher pitches) for

specified number of beats.

Sets the type of instrument that the sprite uses for

play note blocks. (Each sprite has its own instrument.)

Changes sprite’s sound volume by specified amount.

Sets sprite’s sound volume to specified value.

Reports sprite’s sound volume.

Changes sprite’s tempo by specified amount.

Sets sprite’s tempo to specified value in beats per min-


Reports sprite’s tempo in beats per minute.

http://scratch.mit.edu 13 REFERENCE GUIDE

Clears all pen marks and stamps from 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 from color picker.

Changes pen’s color by specified amount.

Sets pen’s color to specified value. (pen-color=0 at red end of

rainbow, pen-color=100 at blue end of rainbow)

Changes pen’s shade by specified amount.

Sets pen’s shade to specified amount. (pen-shade=0 is very

dark, pen-shade=100 is very light)

Changes pen’s thickness.

Sets pen’s thickness.

Stamps sprite’s image onto the Stage.

Runs script below when green flag is clicked.

Runs script below when specified key is pressed.

Runs script below when sprite is clicked.

Waits specified number of seconds, then continues

with next block.

Runs the blocks inside over and over.

Runs the blocks inside a specified number of times.

http://scratch.mit.edu 14 REFERENCE GUIDE

Sends a message to all sprites, triggering them to do
something, and waits until they all finish before con-
tinuing with next block.
Sends a message to all sprites, then continues with the
next block without waiting for the triggered scripts.

Runs script below when it receives specified broadcast


Continually checks whether condition is true; when-

ever it is, runs the blocks inside.

If condition is true, runs the blocks inside.

If condition is true, runs the blocks inside the if por-

tion; if not, runs the blocks inside the else portion.

Waits until condition is true, then runs the blocks

Checks to see if condition is true; if so, runs blocks
inside and checks condition again. If condition is not
true, goes on to the blocks that follow.

Stops the script.

Stops all scripts in all sprites.

http://scratch.mit.edu 15 REFERENCE GUIDE

Reports the x-position of mouse-pointer.

Reports the y-position of mouse-pointer.

Reports true if mouse button is pressed.

Reports true if specified key is pressed.

Reports true if sprite is touching specified sprite, edge,
or mouse-pointer. (Selected from pull-down menu.)
Reports true if sprite is touching specified color. (Click on
color patch, then use eyedropper to select color.)

Reports true if first color (within sprite) is touching

second color (in background or another sprite). (Click on
color patch, then use eyedropper to select color.)

Reports distance from the specified sprite or

Sets the timer to zero.

Reports the value of the timer in seconds. (The timer is

always running.)

Reports a property or variable of another sprite.

Reports the volume (from 1 to 100) of sounds detected

by the computer microphone.
Reports true if computer microphone detects a sound
volume greater than 30 (on scale of 1 to 100).
Reports the value of specified sensor. To use this block, you
need to have a Scratch Board connected to your computer. See http://

Reports true if specified sensor is pressed. To use this

block, you need to have a Scratch Board connected to your computer.
See http://scratch.mit.edu/scratchboard

http://scratch.mit.edu 16 REFERENCE GUIDE

Adds two numbers.

Subtracts second number from first number.

Multiplies two numbers.

Divides first number by second number.

Picks a random integer within the specified range.

Reports true if first number is less than second.

Reports true if two numbers are equal.

Reports true if first number is greater than second.

Reports true if both conditions are true.

Reports true if either condition is true.

Reports true if condition is false; reports false if
condition is true.
Reports result of selected function (abs, sqrt, sin, cos, tan,
asin, acos, atan, ln, log, e^, 10^) applied to specified number.

Reports remainder from division of first number by

second number.

Reports closest integer to a number.

Allows you to create and name a new variable. When you
create a variable, three blocks are created automatically (see below). You
can choose whether the variable is for all sprites (global) or just for one
sprite (local).

Deletes all three blocks associated with the variable.

Changes variable by specified amount.

Sets variable to specified number.

Reports value of variable.

http://scratch.mit.edu 17 REFERENCE GUIDE

While the Scratch website allows projects to be saved to the gallery section! some
teachers may not want their students" projects on the Internet or may want the ability
for students to take their projects home# It is possible to share student projects on both
Windows and Macs by burning them to a CD#

To ensure projects burned to CD will play on ANY computer! certain $les need to
be included# These $les can be found in the folder containing the Scratch application#

Information adapted from Scratch Programming for Teens by Jerry Lee Ford, Jr. © 2009 Course Technology
Where to go for more information
Some books:
• Scratch Programming for Teens
by Jerry Lee Ford, Jr.

• Scratch 1.4
by Michael Badger

Some websites:
• Scratch Website
• ScratchEd
• Workshop Wiki
• Additional links