scratch

Page 1


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.

This Reference Guide provides an overview of the Scratch software. If you are just getting started with Scratch, we encourage you to try the Getting Started Guide first (available from the Support section on the Scratch website). Then, if you want more detailed information, come back to the Reference Guide.

The Scratch website has many other resources to help you learn Scratch: Video tutorials, Scratch cards, and Frequently Asked Questions (FAQs). Please see http://info.scratch.mit.edu/Support/

This guide is for Scratch version 1.4, released July 2009. For the latest version of this Reference Guide, please see: http://info.scratch.mit.edu/Support/


Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab, with financial support from the National Science Foundation, Microsoft, Intel Foundation, Nokia, and the MIT Media Lab research consortia.


BASIC INGREDIENTS OF A SCRATCH PROJECT •

Scratch projects are made up of objects called sprites. You can change how a sprite looks by giving it a different costume. You can make a sprite look like a person or a train or a butterfly or anything else. You can use any image as a costume: you can draw an image in the Paint Editor, import an image from your hard disk, or drag in an image from a website.

You can give instructions to a sprite, telling it to move or play music or react to other sprites. To 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 from the top of the script to the bottom.


SCRATCH INTERFACE


STAGE •

The Stage is where you see your stories, games, and animations come to life. Sprites move and interact with one another on the Stage.

The Stage is 480 units wide and 360 units tall. It is divided into an x-y grid. The middle of the Stage has an xcoordinate of 0 and a y-coordinate of 0.

Click the Presentation Mode button when you want to present your project. To 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.

To find out x-y positions on the Stage, move the mouse (cursor) around and look at the mouse x-y display just below the Stage.


REFERENCE GUIDE REFERENCE GUIDE NEW SPRITES REFERENCE GUIDE NEW SPRITES When you a new you Scratch project, it begins with aproject, single cat it sprite. •  start When start a new Scratch begins with a single cat sprite. To create new NEW SPRITES To create new sprites, on these buttons: sprites, click on these buttons: When you start a new click Scratch project, it begins with a single cat sprite. NEW SPRITES To create sprites, on project, these buttons: When younew start aPaint new click Scratch it begins with cat sprite. your costume aa single new using Paint your own own costume for a newfor sprite usingsprite the Paint Editor.the Paint Editor. To create new sprites, click on these buttons: Paint your own costume for a new sprite using the Paint Editor. Select a costume for a new or import entire Paint your own costume forsprite a new–sprite usinganthe Paintsprite. Editor. Select a costume for a new sprite – or import Select a costume for a new sprite – or import an entire sprite.an entire sprite Get a surprise sprite. Select a costume for a new sprite – or import an entire sprite. Get a surprise sprite. If you want to delete aasprite, selectsprite. the scissors from the Toolbar and click on the sprite. Get surprise Get a surprise sprite. Oryou right-click on the sprite andfrom selectthe delete fromand the click pop-up If want to (Mac: deleteCtrl+click) a sprite, select the scissors Toolbar on menu. the sprite. Or right-click on the andfrom selectthe delete fromand theclick pop-up menu. If you want to(Mac: deleteCtrl+click) a sprite, select thesprite scissors Toolbar on the sprite. To make a sprite that looks like part of the Stage background, right-click (Mac: Ctrl+click) •  If youCtrl+click) want toon delete a sprite, select Or right-click (Mac: the sprite and select delete the fromscissors the pop-upfrom menu.the Toolbar and click on the To sprite that looks like part of the Stage background, right-click (Mac: Ctrl+click) themake Stageaand select grab screen region for new sprite. sprite. Or right-click (Mac: Ctrl+click) on the sprite and select delete from the pop-up the Stageaand select screen new sprite. To make sprite thatgrab looks like region part offor the Stage background, right-click (Mac: Ctrl+click)

menu. SPRITE the StageLIST and select grab screen region for new sprite. SPRITE The Sprite List for alllooks spriteslike in a project. name of each sprite • LIST Todisplays makethumbnails a sprite that part ofThe the Stage background, right-click (Mac: Ctrl The Sprite List displays thumbnails for all sprites in a project. The name of each sprite appears below its thumbnail. SPRITE LIST+click) the Stage and select grab screen region for new sprite. appears below its thumbnail. The Sprite List displays thumbnails for all sprites in a project. The name of each sprite appears below its thumbnail.

To see and edit a sprite’s scripts, costumes, and sounds, click on the sprite’s thumbnail To see Sprite and edit a sprite’s scripts, costumes, and itself sounds, on the(The sprite’s thumbnail in the List – or double-click on the sprite on click the Stage. selected sprite is in the Sprite List – or double-click on the sprite itself on the Stage. (The selected sprite is highlighted andaoutlined in blue in the Sprite List.) To see and edit sprite’s scripts, costumes, and sounds, click on the sprite’s thumbnail highlighted and outlined in blue in the Sprite List.) in the Sprite List – or double-click on the sprite itself on the Stage. (The selected sprite is


Or right-click (Mac: Ctrl+click) on the sprite and select delete from the pop-up menu. To make a sprite that looks like part of the Stage background, right-click (Mac: Ctrl+click) the Stage and select grab screen region for new sprite.

SPRITE LIST

SPRITE LIST

•  •  •  •

The Sprite List displays thumbnails for all sprites in a project. The name of each sprite The Sprite List displays thumbnails for all sprites in a project. The name of each sprite appears below its appears below its thumbnail. thumbnail.

To 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 itself on the Stage. (The selected sprite is To see and edit a sprite’s scripts, costumes, and sounds, click on the sprite’s thumbnail in the Sprite List – or highlighted and outlined in blue insprite the Sprite List.) and outlined in blue in the double-click on the sprite itself on the Stage. (The selected is highlighted Sprite List.) duplicate, or(Mac: deleteCtrl+click) a sprite, right-click (Mac: Ctrl+click) the sprite’s To show, export, duplicate, To or show, deleteexport, a sprite, right-click on the sprite’s thumbnail on in the theStage SpriteorList. To show a spriteon that off the Stage or hidden, Sprite List. To show a spritethumbnail that is offin the hidden, Shift+click theissprite’s thumbnail in theShift+click Sprite List - this will bring the sprite to the middle of the Stage and show it. on the sprite’s thumbnail in the Sprite List - this will bring the sprite to the middle of the Stage and Sprite show it. You can rearrange the sprites in the List by dragging the thumbnails. Just as a sprite can change its appearance by switching costumes, the Stage can change its appearance by the sprites in the Sprite List by dragging the thumbnails. switching backgrounds. To You see can andrearrange edit the scripts, backgrounds, and sounds associated with the Stage, click on the Stage icon at the left of the Sprite List. Just as a sprite can change its appearance by switching costumes, the Stage can change its appearance by switching backgrounds. To see and edit the scripts, backgrounds, and sounds associated with the Stage, click on the Stage icon at the left of the Sprite List.

http://scratch.mit.edu

3

REFERENC


BLOCKS PALETTE AND SCRIPTS AREA •

To program a sprite, drag blocks from the Blocks Palette to the Scripts Area. To 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, from top to bottom.

To find out what a block does, right-click (Mac: Ctrl+click) on it, then select help from the pop- up menu.

When you drag a block around the Scripts Area, a white highlight indicates where you can drop the block and form a valid connection with another block.

To move a stack, pick it up from the top block. If you drag out a block from the middle of a stack, all of the blocks beneath it will come along with it. To copy a stack of blocks from one sprite to another, drag the stack to the thumbnail of the other sprite in the Sprite List.


stack, all ofblocks thealong blocks beneath will come along withwith it.from Toit. cop stack, all thecome beneath ititcopy will along stack, all of the blocks beneath itofwill with it. To acome stack of blocks o To move a stack, pick it up from the to topanother, block. If drag drag out a block from the middle a other sprite the stack to the thumbnail of of the sprite to another, drag the stack to the thumbnail of the other sprite in the Sprite List. sprite to another, dragyouthe stack to the thumbnail of the o

. To change the value, stack, all of the blocks beneath it will come along with it. To copy a stack of blocks from one BLOCKS PALETTE SCRIPTS AREA sprite to another, drag the stack toAND the thumbnail of the other sprite in the Sprite List. Some blocks have white editable text fields. To inside, suchthe as valu unded blocks, like Some blocks have white editable text fields inside, such as change

Some blocks have editable text inside, such click inside thewhite white area and type in afields number. You can alsoas d Some blocks have white text fields inside, such ascan . To.rounded change the value, like inside thehave white areaeditable and type a number. You blocks, •  click Some blocks editable textin fields inside, such as also drop To change inside these areas. click inside the white area inalso a number. click the white area and type in, and a number. canand also type drop rounded blocks, the value, click inside the white area type inYou a number. You can drop likeYou can , inside inside these areas. inside these rounded ,blocks, like areas. ,, inside inside these areas. these areas. Some blocks also have pull-down menus, such as •  Some Some blocks also have pull-down menus,such such Click the blocks also menus, such as onto the to see th Some blocks alsohave havepull-down pull-down menus, asas . Click. Click on theon see the menu. to see the menu. menu. menu.

ck on the •

to see the Some blocks also have pull-down menus, such as

To clean up the Scripts Area, To right-click Ctrl+click) and select clean upCtrl+click) from clean up(Mac: the Scripts Area, right-click (Mac: and se menu. To clean up the Scripts Area, right-click (Mac: Ctrl+click) and select clean up from the menu. menu. a screenshot of thea Scripts Area,ofright-click andArea, select save Tothe clean up To theexport Scripts Area, To right-click (Mac: Ctrl+click) select clean up fromand theselec men export screenshot the and Scripts right-click To export a screenshot of the Scripts Area, right-click and select save picture of scripts. ofascripts. Topicture export screenshot of the Scripts Area, right-click and select save picture of scripts.

Toup add a comment to theCtrl+click) Scripts Area, right-click (Mac: Ctrl+cl ToTo add the Scripts Area, right-click (Mac: Ctrl+click) and select To the Scripts(Mac: Area, right-click (Mac: Ctrl+click) adda acomment commentto to theclean Scripts Area, right-click and select addadd comment. A comment. A yellow comment area will appear, and you can type in text. yellow comment area will appear, and you can type in text. To add a comment to the right-click yellow comment area willScripts appear, Area, and you can type in(Mac: text. Ctrl+click) and select add commen

ean up from the menu. To export a screenshot of the Scripts Area, right-click and yellow comment area will appear, and you can type in text. picture of scripts.

To add a comment to the Scripts Area, right-click (Mac: C To resize the width of the comment area, the handle on the rightarea, edge.use Click thehandle triangle To resize theuse width of the comment the ontex the yellow comment area will appear, and you can type in at the top-left to collapse or expand the comment area. at the top-left to collapse or expand the comment area.

d select add comment. A

To resize the width of the comment area, use the handle on the right edge. Click the trian Comments be added anywhere inthe the Scripts area,area. and you can move them around by at the top-leftcan to collapse or expand comment dragging them.

Comments can be added anywhere in the Scripts area, and you dragging them.

Comments can be added anywhere in the Scripts area, and you can move them around by To attach a comment a block, the drag the comment on top of the block. To detach the Totoresize width of the comment area, use the handle o dragging them. attach comment comment, drag the commentTo away fromathe block. to a block, drag the comment on top of th

at the top-left collapse or expand thethe comment area. comment,to drag the comment away from block.


BLOCKS PALETTE AND SCRIPTS AREA •

To resize the width of the comment area, use the handle on the right edge. Click the triangle at the top-left 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.

To attach a comment to a block, drag the comment on top of the block. To detach the comment, drag the comment away from the block.


COSTUMES

Click the Costumes tab to see and edit the sprite’s

COSTUMES

Sprite (girl1-walking) has two costumes. sprite’s curre is Sprite has two costumes. The sprite’s currentThis costume is The highlighted. To •  Click Costumes tab to see edit thecurrent sprite’s costumes. This hasthe two costumes. Theand sprite’s costume is highlighted. switch to a different costume,you simply click on t itch to aSprite different costume, simply click on the thumbnail of(girl1-walking) the costume want. This Sprite has two costumes. Thesimply sprite’sclick current (girl1-walking) highlighted. To want. switch to a different costume, oncostume the thumbnail of theis costume you switch a different costume, simplyThe click on the thumbnail of(girl1-walking) the costume want. Thisisyou Sprite has two costumes. •  toThis Sprite has two costumes. sprite’s current costume highlighted. To The sprite’s current c There are four ways to create new costumes: switch to a different costume, simply click on the th switchto to acreate differentnew costume, simply click on the thumbnail of the costume you want. ere are four ways costumes: There are toways create new costumes: t $MJDL UP QBJOU B OFX DPTUVNF JO U There are four ways to create new costumes: •  arefour There are four to new create new costumes: There fourways ways to create costumes: t $MJDL UP QBJOU B OFX DPTUVNF JO UIF 1BJOU &EJUPS t $MJDL UP QBJOU B OFX DPTUVNF JO UIF 1 t $MJDL UP JNQPSU BO JNBHF ÍMF GSPN ZPVS IBSE EJTL • t $MJDL UP QBJOU B OFX DPTUVNF JO UIF 1BJOU &EJUPS Click to paint a new costume in the Paint Editor. t $MJDL UP JNQPSU BO JNBHF ÍMF GSP t $MJDL UP QBJOU B OFX DPTUVNF JO UIF 1BJOU &EJUPS t $MJDL UP JNQPSU BO JNBHF ÍMF GSPN ZP t $MJDL UP UBLF QIPUPT GSPN B XFCDBN t $MJDL UP JNQPSU BO JNBHF ÍMF GSPN ZPVS IBSE EJTL • t $MJDL UP JNQPSU BO JNBHF ÍMF GSPN ZPVS IBSE EJTL Click to import an image file from your hard • Click to take photos t $MJDL UP UBLF QIPUPT GSPN B XFCDBN CVJMU JOUP PS DPOOFDUFE UP ZPVS DPNQVUF disk.t $MJDL UP UBLF QIPUPT GSPN B XFC Each time you from click the button (or a webcam (built into or connected to your computer). t %SBH JO POF PS NPSF JNBHFT GSPN UIF XFC t $MJDL UP UBLF QIPUPT GSPN B XFCDBN CVJMU JOUP PS DPOOFDUFE UP ZPVS DPNQVUFS Each t $MJDL UP UBLF QIPUPT GSPN B XFCDBN CVJMU JOUP PS DPOOFDUFE UP ZPVS DPNQ Each time you click the a photo. button you click the button (or press the spacebar), it takes •  time Each time you click the button (or press the spacebar), it takes a photo. Scratch recognizes many image formats: JPG, BMP Each time you click the button (or press the spacebar), it takes a photo. t %SBH JO POF PS NPSF JNBHFT GSPN UIF X Each time you click the button (or press the spacebar), it takes a photo. •  t %SBH JO POF PS NPSF JNBHFT GSPN UIF XFC PS ZPVS EFTLUPQ Drag in one or more images from the web or your desktop. Scratch recognizes many image t %SBH JO POF PS NPSF JNBHFT GSPN UIF XFC PS ZPVS EFTLUPQ Each costume has a costume number (displayed to formats: JPG, BMP, PNG, GIF (including animated GIF). t %SBH JO POF PS NPSF JNBHFT GSPN UIF XFC PS ZPVS EFTLUPQ costumes by dragging the thumbnails. The costume •  Each costume has a costume number (displayed to its left). You can rearrange the orderformats: of Scratch recognizes many image JPG, Right-click (Mac:GIF). Ctrl+click) on a costume thumbnB Scratch recognizes many image formats: JPG, BMP, PNG, GIF (including animated the costumes by dragging the thumbnails. The costume numbers update if you change their ratch recognizes many image formats: JPG, BMP, PNG, GIF (including to export aanimated copy of the costumeGIF). as a separate file. order. Scratch recognizes many image formats: JPG, BMP, PNG, GIF (including animated GIF). SOUNDS Each • costume has a(Mac: costume number toEach its left). You can rearrange theaorder of the(displaye Right-click Ctrl+click) on a(displayed costume thumbnail to convert the costume into new sprite, costume has a costume Click the Soundsnumber tab to see the sprite’s sounds. or to export a copy of the costume as a separate file. ch costume has a costume number (displayed to its left). You can rearrange the order th costumes by dragging the thumbnails. The costume numbers update if you change their order. Theof costumes by dragging thumbnails. Each costume has a costume number (displayed to its left). You canthe rearrange the ordercost of stumes by dragging the thumbnails. The costume numbers update if you change their orde costumes by(Mac: dragging the thumbnails. The costume numbers updateinto if you change their o Right-click Ctrl+click) on a costume thumbnail to convert the costume a new sprite, or to export a copy of the costume as a separate file. Right-click (Mac: Ctrl+click) on a costume thum ght-click (Mac: Ctrl+click) on a costume thumbnail to convert thethe costume into new sprifi to export a copy of costume asinto aaimport separate You can record new sounds or S Right-click (Mac: Ctrl+click) on a costume thumbnail to convert the costume a sound newfiles.sp WAV, AIF, and AU files (encoded with 8-bits or 16-b export a copy of the costume as a separate file. SOUNDS to export a copy of the costume as a separate file. Click the Sounds tab to see the sprite’s sounds.

OUNDS SOUNDS

SOUNDS

http://scratch.mit.edu

Click the Sounds tab to see the sprite’s sounds


SOUND

t $MJDL UP UBLF QIPUPT GSPN B XFCDBN CVJMU JOUP PS DPOOFDUFE UP ZPVS DPN Each time you click the button (or press the spacebar), it takes a photo. t %SBH JO POF PS NPSF JNBHFT GSPN UIF XFC PS ZPVS EFTLUPQ

Scratch recognizes many image formats: JPG, BMP, PNG, GIF (including animated GIF) Each costume has a costume number (displayed to its left). You can rearrange the order

• 

Click the Sounds tab to see the sprite’s sounds. costumes by dragging the thumbnails. The costume numbers update if you change their

• 

You can record new sounds or import sound files. Scratch can read MP3 files and Right-click (Mac: Ctrl+click) on a costume thumbnail to convert the costume into a new uncompressed WAV, AIF, and to AUexport filesa (encoded with 8-bits or 16-bits per sample, copy of the costume as a separate file. but not 24-bits per sample). SOUNDS

Click the Sounds tab to see the sprite’s sounds.

You can record new sounds or import sound files. Scratch can read MP3 files and uncom WAV, AIF, and AU files (encoded with 8-bits or 16-bits per sample, but not 24-bits per sa

http://scratch.mit.edu

5


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 for the sprite. •  The sprite’s direction indicates which direction the sprite will move when it runs a move block (0=up, 90=right, 180=down, -90=left). The blue line on the thumbnail shows the sprite’s direction. You can drag this line to change the sprite’s direction. Double-click on the thumbnail to set the direction 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. To 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 file, which can then be imported into another project.


ROTATION STYLE •

direction.

Click the Rotation Style buttons to control how the costume appears as the sprite changes its direction.

Rotate: The costume rotates as the sprite changes direction.

Left-right flip: The costume faces either left or right.

No-rotate: The costume never rotates (even as the sprite changes direction).


TOOLBAR

s r e g r a l r Click on the o f k c i g l r c a + l t f r i o h f S k ( c . i r l c e g + t g a f i Delete: i e b r h s a S e ( k t . i r n Grow: r e a Grow: p l l Grow: l s b a e y m k n s a s Shrink: Ma Shrink: e n t o i r k p c i s l c e To return to the arrow c , Mak r o s r u c w o r r a e h t o •

Click on the Toolbar to select a tool, then click on other objects to perform an action.

Duplicate: Duplicate sprites, costumes, sounds, blocks, or scripts. (Shift+click for multiple.)

Delete: Delete sprites, costumes, sounds, blocks, and scripts. (Shift+click for multiple.)

Grow: Make sprites bigger. (Shift+click for larger size steps.)

Shrink: Make sprites smaller. (Shift+click for larger size steps.)

To return to the arrow cursor

, click on any blank area of the screen.


MENU canMENU add edit language of Scratch. chan Click theor Language icon translations to change the languageToforadd theorScratc MENU referadd to the Support section of the Scratch websiteAnyone (http://info.s can or edit ofScratch Scratch. add or chan Clicklanguage the Language icon translations to change the language for the user interface.To can add or edit language translations of Scratch. To add or change a translation, please •  Click the Language icon to of change the language for the Scratch user(http://info.sc Click the Language to change the language for the Scratch user interface refer to theicon Support section the Scratch website (http://info.scratch.mit.edu/Translation/). refer tointerface. the Support section of the Scratch website Anyone can add or edit language translations of Scratch. To add or can add or edit language translations of Scratch. Toofadd change a translation, Click the Save icon to save your change a translation, please refer toproject. the Support section the or Scratch website Click the Save icon to save your project. refer(http://info.scratch.mit.edu/Translation/). to the Support sectiontoof the Scratch website (http://info.scratch.mit.edu/Tr Click the Share icon upload your project to the Scratch website. Click• the Save icon tosave save your project. Click the Save icon to your project. From the File menu you can create a new project, open an existing project, and save •  the Click the Share icon to upload your project to project the Scratch website. Click theShare Save icon to save your Click icon to upload your to the Scratch we projects to the Scratch Projects folderproject. or to other locations. •  From the File menu you can create a new project, open an existing project, and brings all of the sprites and backgrounds from another project into the saveShare projects Import to theProject Scratch folder or to other locations. to the Scratch we Click the icon toProjects upload your project current project. This feature is useful for combining sprites from multiple projects. Click the Share icon to upload your project to the Scratch website. Import Project brings all of thecan spritescreate and backgrounds from another project intoan exist From•  the File menu new Export Sprite you saves the current sprite as a .spriteafile, which canproject, then be importedopen into the current project. This feature is useful for combining sprites from multiple another project. projects. From the File menu you can create a new project, open an existing project, and projects themenu Scratch Projects folder or to other locations. From thetoFile you can create a new project, open an exist Project allows you to write and notes about project, as be imported •  Export savesNotes theProjects current sprite as save aor .sprite file,your which cansuch then projects toSprite the Scratch folder to other locations. instructions on how to use it. projectsintotoanother the project. Scratch Projects folder or to other locations. Quit exits the Scratch program. Import Project brings the sprites and backgrounds fro Import Project brings all ofall theof sprites and backgrounds from another projec The Edit menu provides several features for editing the current project. current project. This feature is useful for combining sprites from multiple p currentProject project. This feature is useful for combining sprites Import brings all of the sprites and backgrounds from Undelete allows you to retrieve the last block, script, sprite, costume, or sound you deleted. current project. This feature is useful for combining sprites Export Sprite saves the current sprite as a .sprite file, which can then be impo Start Single Stepping allows you to watch Scratch programs run one step at a time. Each Export Sprite current as abugs.sprite block saves is highlightedthe as it runs. This feature cansprite be useful for finding in programs,file, which another project. and for helping new programmers understand the flow of a program. Set Single Stepping allows you to choose the speed of single stepping (from to turbo speed). Export saves the current sprite as slow a .sprite file, which c anotherSprite project.


MENU •  •  •  •

•  •

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. The Edit menu provides several features for 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. This feature can be useful for finding bugs in programs, and for helping new programmers understand the flow of a program. Set Single Stepping allows you to choose the speed of single stepping (from slow to turbo speed). Compress Sounds or Compress Images to reduce the overall project file size. Compressing may reduce the quality of 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. The motor blocks work with LEGO® Education WeDoTM (http://www.legoeducation.com). 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 reference materials, tutorials, and frequently asked questions. You can also access a page with all the Scratch help screens.


and frequently asked questions. You can also access a page with all the Scratch help screens.

GREEN

From the Help menu you can access a Help page with links to reference materials, tutorials, and frequently asked questions. You can also access a page with all the Scratch help screens. FLAG

GREEN FLAG

The Green Flag provides a convenient way to start many scripts at the same time.

GREEN FLAG

The Green Flag provides a convenient way to start many scripts at the same time.

Click theGreen Green Flag Flag (at the top-right corner of to thestart stage) to start all at scripts that have •  The provides a convenient way many scripts the same at the top. time. ClickClick the Green thethe top-right ofthe thestage) stage) to start all scripts the GreenFlag Flag (at (at top-rightcorner corner of to start all scripts that have that have the top. atatthe top. The Flag remains highlighted whilewhile scripts are running. •  Green The Green Flag remains highlighted scripts are running. The Green Flag remains highlighted while scripts are running.

•  Presentation In Presentation Mode, pressing the Enter key the hassame the same as clicking the Flag. In Mode, pressing the Enter key has effecteffect as clicking the Green In Presentation Mode, pressing the Enter key has the same effect as clicking the Green Flag. Green Flag.

On website, as soon as as you aview project, the Green FlagFlag isFlag automatically •  the On Scratch the Scratch as soon asview you a aproject, theGreen Green is On thewebsite, Scratch website, soon as you view project, the is automatically automatically triggered. triggered. triggered.

PAINT EDITOR PAINT EDITOR

You can use the Paint Editor to create or edit costumes and backgrounds. You can use the Paint Editor to create or edit costumes and backgrounds. SCALE BUTTONS Change size of current selection.

SCALE BUTTONS ROTATE BUTTONS FLIP BUTTONS CLEAR Change sizeBUTTONS of RotateFLIP current Flip current selection ROTATE BUTTONS CLEAR Erase canvas. current selection. Rotate current selection. Flip current horizontally selection or vertically. Erase canvas.

selection.

horizontally or vertically.

IMPORT IMAGE

IMPORT IMAGE UNDO/REDO TOOLBAR

UNDO/REDO TOOLBAR OPTIONS AREA CURRENT COLORS COLOR PALETTE

CANVAS


In Presentation Mode, pressing the Enter key has the same effect as clicking the Green Flag. On the Scratch website, as soon as you view a project, the Green Flag is automatically PAINT EDITOR triggered.

PAINT You can use theEDITOR Paint Editor to create or edit costumes and backgrounds. You can use the Paint Editor to create or edit costumes and backgrounds. SCALE BUTTONS ROTATE BUTTONS FLIP BUTTONS Change size of Rotate current Flip current selection current selection. selection. horizontally or vertically.

CLEAR Erase canvas.

IMPORT IMAGE UNDO/REDO TOOLBAR OPTIONS AREA CANVAS

CURRENT COLORS COLOR PALETTE Pick the current colors. ALTERNATE PALETTE

SET COSTUME CENTER

http://scratch.mit.edu

ZOOM

8

REFERENCE GUIDE


E GUIDEPAINT EDITOR

g tools: •  The Paint Editor Toolbar has the following tools: Paintbrush: Paint freehand using the current the current foreground Whenyou you click foregroundcolor. color. When click on on thisthis tool, the Options Area shows the brush size. Click he following tools: picka adifferent different brush brush size. rush size. Click to to pick size.Eraser: Erase with freehand strokes. The areas that you hand using current foreground color. When click ontool, thisthe Options Area shows the eraser erase transparent. When you you click on this es. The areasthe that youbecome erase become transparent. When size. Click picka adifferent different eraser howsshows the brush size. Click to to pick brushsize. size.Fill: Fill connected areas with a solid color Area theoreraser size. Click to pick a different When you click become this tool, transparent. the Options Area shows the fill style (solid color, hand strokes. Thegradient. areas that you erase When horizontal gradient, vertical gradient, or radial gradient). Gradients blend from the selected heidOptions Area shows thecolor eraser size.this Click to pick color. a different color or gradient. When youtoclick tool, the foreground the selected background Rectangle: Draw a filled or outlined

DE

rectangle (Shift+drag for a square) using the current foreground color. When you click this olid color, horizontal gradient, vertical gradient, or radial with a solid color gradient. When you this(solid tool,orthe tool, or thecolor Options shows theclick fill style outlined). The outline thickness is es selected foreground to Area the selected background determined by the gradient, paintbrushvertical size. Ellipse: Drawor a filled or outlined ellipse (Shift+drag for a fill style (solid color, horizontal gradient, radial circle) using the current foreground color. When you click this tool, the Options Area shows nd from the selected foreground color to the selected background FE SFDUBOHMF 4IJGU ESBH GPS B TRVBSF VTJOH UIF DVSSFOU the fill style (solid or outlined). The outline thickness is determined by the paintbrush size. ng tools: Line: Draw a straight line (Shift+drag for aor horizontal or vertical line) using the current his tool, the Options Area shows the fill style (solid E PS PVUMJOFE SFDUBOHMF 4IJGU ESBH GPS B TRVBSF VTJOH UIF DVSSFOU g the current color.size. When ontool, thisthe Options Area shows the brush size. Click foreground color. When youyou clickclick on this determined byforeground the paintbrush pick a different different brush size. Text: Add text to the you click tool, the Options Area shows the fill style (solid or drawing. When you click on this brush size.this Click totopick brush size. MMJQTF 4IJGU ESBH GPS B DJSDMF VTJOH UIF DVSSFOU tool, you the by Options Area allows you to change the font face and font size ickness determined the paintbrush size. kes. Theisareas that erase become transparent. his tool, the Options Area shows the fill style (solidWhen or s PVUMJOFE FMMJQTF 4IJGU ESBH GPS B DJSDMF VTJOH UIF DVSSFOU Area showsbythe size. Click determined theeraser paintbrush size. to pick a different you click this tool, the Options Area shows the fill style (solid or SBH GPS B IPSJ[POUBM PS WFSUJDBM MJOF VTJOH UIF DVSSFOU ickness is or determined byArea theyou paintbrush size. olid color gradient. When clickthe this tool,size. the on this tool, the Options shows brush OF 4IJGU ESBH GPS B IPSJ[POUBM PS WFSUJDBM MJOF VTJOH UIF DVSSFOU (solid ize. color, horizontal gradient, vertical gradient, or radial you click on this tool, the Options Area shows theyou brush he selected foreground color to the selected background en you click on this tool, the Options Area allows to size. ent brush size. can only have one block of text. Each costume rawing. When you click on this tool, (press the Options OFE SFDUBOHMF 4IJGU ESBH GPS B TRVBSF VTJOH UIF DVSSFOU gion, then move it to a new location delete Area to allows you to


PAINT EDITOR •

The Current Colors (foreground and background) are shown below the Options Area. You can click the color swap arrow to exchange the foreground and background colors. Click in the Color Palette to pick a new foreground color (Shift+click to select a background color). To switch between the default 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 of rotation when the Costume is rotated on the Stage.

Click the Zoom buttons (in or out) to increase or decrease the view magnification of the Canvas. When the zoom is greater than 100%, scroll bars are used to pan around the Canvas. Zoom does not change the size of the image. . Each costume can only have one block of text. Selection: Select a rectangular region, then move it to a new location (press delete to remove the selection, Shift+delete or Shift+backspace to crop). Stamp: Select a rectangular region, then copy it to new locations (Shift+click+drag for repeated stamping). Eyedropper: Use the tip of the eyedropper to choose the foreground color (click on the Canvas and drag the eyedropper to pick a color from outside the Canvas).


PAINT EDITOR •  To change the size of the Canvas content, or just the current selection, click on the Scale buttons (grow or shrink). You can Shift+click on the buttons to enter a precise value. Shrinking decreases the size and resolution of the image. •  To rotate the Canvas content, or just the current selection, click on the Rotate buttons (counter- clockwise or clockwise). You can Shift+click on the buttons to enter a precise value. •  To flip 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 from file and add it to the Canvas. Click the Clear button to remove all content from the Canvas. •  If you make a mistake, you can click the Undo button repeatedly to undo the last several actions. If you change your mind, you can click the Redo button to restore the undone actions.


3. SCRATCH BLOCKS

Undo button repeatedly to undo the last severalIfactions. you change your mind, you can click the Redo button to restore the undone ac e Redo button to restore the undone actions.

3. SCRATCH BLOCKS 3.SCRATCH SCRATCHBLOCKS BLOCKS TYPES OF 3. BLOCKS

SCRATCH BLOCKS TYPES OF BLOCKS

There three main types of Blocks blocksPalette: in the Blocks Palette: There are threeare main types of blocks in the TYPES OF BLOCKS TYPES OF BLOCKS There are three types blocks Blocks Palette: •  There are three main types ofare blocks inmain thetypes Blocks Palette: There three main of of blocks in in thethe Blocks Palette: e Blocks Palette: Stack Blocks: These blocks have bumps on the bottom and/or notches on the top, such Stack Blocks: These blocks have bumps on the bottom and/or notchesthe o •  Stack blocks have bumps on the bottom and/or notches on thean notches Stack Blocks: These blocks have bumps bottom and/or as Blocks: . YouThese can snap these blocks together into stacks. Some stack blocks have inputon on Stack Blocks: These blocks have bumps onon thethe bottom and/or notches the to top,area such as You can snap these together into stacks. Some stack as . You can snap these blocks together into stacks. Some stack block . You can snap these blocks together into stacks. Some stack blocks hava on the bottom and/or notches on the top, such inside them, where you type ablocks number (such as 10 in the block) or asas .can You can snap these blocks together into stacks. Some stack blocks have blocks have input area inside them, where you can type a number (such er into stacks. Some stack blocks have an input area inside them, where you can a number (such as 10 in the b area inside them, where you canyou type atype number (such in10 the inside them, where can type a number (such asas 1010 inas the bloc choose an an item from aarea pull-down menu (such as pop in the block). Some the block) or anan item from pull-down menu (such as pop umber (such as 10 in the block) orchoose choose item from aapull-down menu (such as pop in the block). choose an item from pull-down menu (such aspop pop in the Som stack blocks, such as ,pull-down have a aC-shaped “mouth” where you can insert otherblock). choose an item from a menu (such as in the blo uch as pop in the in the block). block). Some blocks, such as ,, have have “mouth” stack blocks, such , have aC-shaped C-shaped “mouth” where ins stack blocks, such asas a aC-shaped “mouth” where youyou cancan inser stack blocks.Some stack stack blocks, such as , have a C-shaped “mouth” where you ca C-shaped “mouth”where where you you can other stack blocks. caninsert insert other stack blocks. stack blocks.

stack blocks. Hats: These blocks haverounded roundedtops, tops,such such as . These blocks are placed Hats: These blocks have as Hats: These blocks have rounded tops, such as . These block Hats: These blocks have rounded tops, such as at .the tops of stacks. They wait for an event to happen, such as a key being pressed,. These then blocks a uch as These blocks are placed the tops stacks. They wait for event happen, such a key being pre •  These blocks are placedatat at the tops of stacks. They for an event tosuch happen, the tops ofof stacks. They wait forwait anan event to to happen, as as a key being presse blocks underneath them. nt to happen, such as run a keythe being pressed, thenrun Hats: These blocks have rounded tops, such as . These run the blocks underneath them. the blocks underneath them. such as a key being pressed, then run the blocks underneath them. •

at the tops of stacks. They wait for an event to happen, such as a key bein

Reporters: These blocks, such as These and such designed to fit indesigned the input Reporters: blocks, as as , areand , are to fit in th Reporters: These blocks, such and , are designed to fit in run the blocks underneath them. and , are designed fit inblocks. the input area of to other Reporters with rounded ends (such as or ) report numbers area ofof other blocks. Reporters with rounded ends (such as as or or ) rep area other blocks. Reporters with rounded ends (such ) ded ends (such as or ) report or strings, and fit in numbers blocks with rounded or rectangular holes (such as or ). oror strings, and fitfit inin blocks with rounded or or rectangular holes (such as as strings, and blocks with rounded rectangular holes (such or rectangular holes (such as or ). (such as Reporters with pointed ends ) report boolean values (true or false) and fit(true inside Reporters with pointed (such as asand ) report boolean (true or to fals Reporters: These blocks, suchends as ,boolean arevalues designed with pointed ends (such ) report values or ) report boolean values (true or false) and fitReporters inside blocks with pointed or blocks rectangular holes (such as or(such with pointed oror rectangular holes (such as as ). or or ). ). blocks with pointed rectangular holes

uch as

or

nt value.

10

).area of other blocks. Reporters with rounded ends (such as

or orany strings, and fitto in blocks with rounded or rectangular holes (such as Click on any reporter block to to seesee itsits current value. Click on reporter block see its current value. Click on any reporter block current value. Reporters with pointed ends (such as ) report boolean values (tru blocks with pointed or rectangular holes (such as 10 or ). http://scratch.mit.edu http://scratch.mit.edu http://scratch.mit.edu REFERENCE GUIDE

10

Click on any reporter block to see its current value.

10

REFER


If you change your mind, you can click the Redo button to restore the undone actions. choose from a pull-down menu .(such as popblocks in the block). Some stack blocks. ts: These blocks have rounded tops, such asan item These are placed 3. SCRATCH BLOCKS

stack blocks. block). Some stack blocks, such as ull-down menu (such as pop in the , have a C-shaped “mouth” where you can insert other the tops of stacks. They wait for an event to happen, such as a key being pressed, then , have a C-shaped “mouth” where you can insert other stack blocks. Hats: These blocks have rounded tops, such as . These blocks are placed BLOCKS . These blocks are placed 3. SCRATCH Hats: These .blocks have rounded such as . These blocks are placed edthe tops, These blocks aretops, placed . such Theseasblocks are placed n blocks underneath them. at the tops of stacks. They wait for an event to happen, such as a key being pressed, then h as a key being pressed, then at the tops of stacks. They wait for an event to happen, such astops, a key being TYPES OF BLOCKS Hats: These blocks have rounded such aspressed, then . These blocks are place TYPES OF BLOCKS for an event to happen, such as a key being pressed, then ch as a key being pressed, then run the blocks underneath them. the blocks underneath atthe theBlocks tops ofPalette: stacks. They wait for an event to happen, such as a key being pressed, then are run three main types of blocks in rounded tops, such as There . These are them. placed typesblocks of blocks in the Blocks Palette: There are three main m. run the blocks underneath them. y wait for an event to happen, such as a key being pressed, then porters: These blocks, such as and are designed to fitinput theinput input Reporters: These blocks, such as and and/or,notches , are designed to fitthe in the Reporters: These blocks, such as and ,, are designed to fit in Stack Blocks: These have bumps on on the top, top, such •  Reporters: These blocks, and are designed to fit inininput the th them. These blocks blocks havesuch bumpsas on the the bottom bottom and/or notches on the such Stack Blocks: These blocks, such and ,numbers are designed fit in the input area of snap other blocks. with rounded ends (such asblocks or or ) report as . You can these blocks into stacks. Some stack have an input ea to fit in the input area other blocks. Reporters with rounded ends (such asas have ) report numbersto asdesigned ,ofare designed toReporters fittogether inReporters: the input can snap these blocks together into stacks. Some stack blocks an input area of other blocks. Reporters with rounded ends (such as or ) report are designed to fit in of otherand blocks. Reporters with rounded ends (such as or ) report numbers as the . input You of other with rounded ) report nu strings, and fit in blocks with rounded or rectangular (such as or asor ). or ). area inside them, where you can type aaarea number (such as 10Reporters in the theholes block) or (such or strings, and fit to in blocks with rounded orblocks. rectangular holes (such as ends s, such rounded as or and ,oras are designed fit infit the input area inside them, where you can type number (such as 10 in block) or )) report numbers with ends (such or ) report numbers numbers or strings, and in blocks with rounded or rectangular holes (such as s or report numbers or strings, and fit in blocks with rounded or rectangular holes (such as or). Reporters with pointed ends (such asas pop in the) )report boolean values (true or false) and fit inside choose an item from aapointed pull-down menu (such block). Some strings, fitends in blocks rounded or rectangular holes (such as(true Reporters with ends (such as boolean values or false) and fitor inside orters withand rounded (such as or ) report numbers itemwith from pull-down menu (such as pop in the report block). Some choose an Reporters with pointed ends (such as insert boolean values (true or false) and esles (such asas orholes rounded or rectangular (such asororrectangular orpointed ). where or ).). Reporters with (such as )) report report boolean blocks with rectangular holes (such asends or can ). other (such or ).pointed stack blocks, such as ,, have aa C-shaped “mouth” where you such as have C-shaped “mouth” you canvalues insert other ks with rounded or rectangular holes (such as or blocks ). (such stackblocks blocks, with pointed holes asor rectangular or ).as(true or or porters with pointed ends (such as ) report boolean false) and fit insid with pointed holes (such ). blocks. lean(such values or and fitvalues inside uch as )stack report boolean values (true false) and fit inside (true or false) and fitorinside blocks with pointed or rectangular holes (such oolean values (truevalues or and fit inside stack blocks. ends as (true ) false) report boolean (true or false) and fit inside Click on any reporter block to see its current value. cks with rectangular as ). ctangular holes as or oror ). ).holes lar (such asas ).block to(such orholes ).(such or ).pointed Click on any reporter see itsoncurrent value.block to or Click any reporter see its current value. Hats: These blocks have rounded tops, such as . These blocks are placed . These blocks are placed Hats: These blocks have rounded tops, such as at the tops of stacks. They wait for an event to happen, such as a key being pressed, pressed, then then of stacks. They wait at theon tops for an suchvalue. as a key being •  value. Click any reporter block to event see to itshappen, current ck to see its current 10 REFERENCE GUIDE http://scratch.mit.edu e its current value.run blocks them. underneath run the the blocks underneath 10 ck on any reporter block to see its current value. http://scratch.mit.edu Some reporter blocks have a check box next to them, such as . If you click inGUIDE the 10 them, such as REFERENCE •  Somehttp://scratch.mit.edu reporter blocks have a check box next to . If you Reporters: blocks, such as stage, and , are designed to fit in thevalue input the Reporters: These blocks, appears on displaying the current ofcurrent the reporter. As the click check box, a the monitor appears on the stage, displaying 10in theThese REFERENCE GUIDE area of of other other blocks. area numbers blocks. Reporters Reporters with rounded ends (such as or ) report numbers value of the reporter. As the value of the reporter changes, the monitor updates 10strings, REFERENCE GUIDE or strings, and fit fit in in blocks with rounded ).). or and blocks or rectangularREFERENCE holes (such as GUIDE or REFERENCE GUIDE automatically. Reporters with ends (such as with pointed pointed ends Reporters ) report fit inside inside 10 boolean values (true or false) and fit REFE p://scratch.mit.edu blocks with pointed or rectangular holes (such as or ). blocks with pointed or rectangular

SCRATCH BLOCKS

Click on on any any reporter reporter block block to to see see its its current current value. value. Click http://scratch.mit.edu http://scratch.mit.edu

10 10

REFERENCE REFERENCE GUIDE GUIDE


BLOCK DESCRIPTIONS The Scratch blocks are organized into eight color-coded categories: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables.

BLOCK DESCRIPTIONS Motion

Moves sprite forward or backward.

REFERENCE GUIDE

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. http://scratch.mit.edu

Moves sprite to specified x and y position on Stage. 12 REFERENCE GUIDE 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.

The Scratch blocks are organized into eight color-coded categories: Motion, Looks, Sets sprite’sOperators, x-position to specified value. Sound, Pen, Control, Sensing, and Variables. 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)


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 BLOCK DESCRIPTIONS 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)

MOTOR BLOCKS The motor blocks only appear if you choose Show Motor Blocks in the Edit menu or if you plug in a -&(0 8F%P ÉĽFTF CMPDLT XPSL XJUI B -&(0 8F%P NPUPS 4FF http://www.legoeducation.com) Turns motor on for specified amount of time. Turns motor on. Turns motor off. Sets power of motor and turns motor on. (Ranges from 0 to 100)


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

BLOCK DESCRIPTIONS

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

The motor blocks only appear if youReports choose Show Motor Blocks in the Edit sprite’s direction. (0=up, 90=right, 180=down, -90=left) menu or if you plug in a LEGO WeDo. These blocks work with a LEGO WeDoMOTOR motor. BLOCKS The motor blocks only appear if you choose Show Motor Blocks in the Edit menu or if you plug in a -&(0 8F%P ɼFTF CMPDLT XPSL XJUI B -&(0 8F%P NPUPS 4FF http://www.legoeducation.com) Turns motor on for specified amount of time. Turns motor on. Turns motor off. Sets power of motor and turns motor on. (Ranges from 0 to 100)

Sets or changes direction of motor, but does not turn motor on. (this way = clockwise; that way = counterclockwise; reverse = change direction)

http://scratch.mit.edu

13

REFERENCE GUIDE


REFERENCE GUIDE

BLOCK DESCRIPTIONS Looks Changes sprite’s appearance by switching to different costume. Changes sprite’s costume to next costume in the costume list. (If at end of the costume list, jumps back to first costume.) Reports sprite’s current costume number. Changes Stage’s appearance by switching to a different background. Changes Stage’s background to next background in the background list. Reports Stage’s current background number. %JTQMBZT TQSJUF T TQFFDI CVCCMF GPS TQFDJGJFE amount of time. %JTQMBZT TQSJUF T TQFFDI CVCCMF (You can remove speech bubble by running this block without any text.)

%JTQMBZT TQSJUF T UIPVHIU CVCCMF GPS TQFDJĂŤFE amount of time. %JTQMBZT TQSJUF T UIPVHIU CVCCMF 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.


Reports Stage’s current background number. %JTQMBZT TQSJUF T TQFFDI CVCCMF GPS TQFDJGJFE amount of time.

BLOCK DESCRIPTIONS %JTQMBZT TQSJUF T TQFFDI CVCCMF

(You can remove speech bubble

by running this block without any text.)

%JTQMBZT TQSJUF T UIPVHIU CVCCMF GPS TQFDJĂŤFE amount of time. %JTQMBZT TQSJUF T UIPVHIU CVCCMF 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. Makes sprite disappear from the Stage. (When sprite is hidden, other sprites cannot detect it with touching? block.)

http://scratch.mit.edu

14

REFERENCE GUIDE


BLOCK DESCRIPTIONS

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.

Sound 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.

Rests (plays nothing) 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. Volume ranges from 0 to 100.

Sets sprite’s sound volume to specified value. Reports sprite’s sound volume. Changes sprite’s tempo by specified amount.


Plays a musical note (higher numbers for higher pitches) for specified number of beats.

BLOCK DESCRIPTIONS

Rests (plays nothing) 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. Volume ranges from 0 to 100.

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 minute. Reports sprite’s tempo in beats per minute.

http://scratch.mit.edu

15

REFERENCE GUIDE


Pen

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. Picking the color also changes the pen shade.

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. Ranges from 0 to 200 to go around the color wheel.)

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. Default is 50, unless set with color picker.)

Changes pen’s thickness. Sets pen’s thickness. Stamps sprite’s image onto the Stage.

Control 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

BLOCK DESCRIPTIONS

Clears all pen marks and stamps from the Stage.


Sets pen’s shade to specified amount. (pen_shade=0 is very dark, pen_shade=100 is very light. Default is 50, unless set with color picker.)

Changes pen’s thickness.

BLOCK DESCRIPTIONS Sets pen’s thickness.

Stamps sprite’s image onto the Stage.

Control 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

16

REFERENCE GUIDE


Sends a message to all sprites, triggering them to do something, and waits until they all finish before continuing with next block. Runs script below when it receives specified broadcast message. Continually checks whether condition is true; whenever it is, runs the blocks inside. If condition is true, runs the blocks inside.

If condition is true, runs the blocks inside the if portion; if not, runs the blocks inside the else portion. Waits until condition is true, then runs the blocks below. Checks to see if condition is false; if so, runs blocks inside and checks condition again. If condition is true, goes on to the blocks that follow. Stops the script. Stops all scripts in all sprites.

Sensing Reports true if sprite is touching specified sprite, edge, or mouse-pointer. (Select 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.)

BLOCK DESCRIPTIONS

Sends a message to all sprites, then continues with the next block without waiting for the triggered scripts.


inside and checks condition again. If condition is true, goes on to the blocks that follow. Stops the script. BLOCK DESCRIPTIONS Stops all scripts in all sprites.

Sensing Reports true if sprite is touching specified sprite, edge, or mouse-pointer. (Select 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.)

http://scratch.mit.edu

17

REFERENCE GUIDE


REFERENCE GUIDE

BLOCK DESCRIPTIONS Asks a question on the screen and stores keyboard input in the . Causes the program to wait until the Enter key is pressed or check mark is clicked. Reports keyboard input from the most recent use of . Shared by all sprites (global). 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 distance from the specified sprite or mouse-pointer. 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 a sensor connected to your computer. You can use this with a Scratch sensor


Reports true if specified key is pressed. Reports distance from the specified sprite or mouse-pointer.

BLOCK DESCRIPTIONS 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 a sensor connected to your computer. You can use this with a Scratch sensor board (http://www.playfulinvention.com/picoboard.html) or with LEGOŽ WeDo™ (http://www.legoeducation.com).

Reports true if specified sensor is pressed. To use this block, you need to have a Scratch sensor board connected to your computer. (See http:// www.playfulinvention.com/picoboard.html)

http://scratch.mit.edu

18

REFERENCE GUIDE


BLOCK DESCRIPTIONS

REFERENCE GUIDE Operators Adds two numbers. Subtracts second number from first number. Multiplies two numbers. %JWJEFT ĂŤSTU OVNCFS CZ TFDPOE OVNCFS Picks a random integer within the specified range. Reports true if first value is less than second. Reports true if two values are equal. Reports true if first value 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. Concatenates (combines) strings. Reports the number of letters in a string. Reports the letter at the specified position in a string. Reports result of selected function (abs, sqrt, sin, cos, tan, asin, acos, atan, ln, log, e^, 10^) applied to specified number.


Reports true if both conditions are true.

BLOCK DESCRIPTIONS

Reports true if either condition is true. Reports true if condition is false; reports false if condition is true. Concatenates (combines) strings. Reports the number of letters in a string. Reports the letter at the specified position in a string. 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.

http://scratch.mit.edu

19

REFERENCE GUIDE


BLOCK DESCRIPTIONS

REFERENCE GUIDE Variables Click to create and name a new variable. When you create a

variable for the first time, the variable blocks will appear. You choose whether the variable is for all sprites (global) or just for one sprite (local).

%FMFUFT BMM CMPDLT BTTPDJBUFE XJUI B WBSJBCMF Reports value of the variable. Changes the variable by specified amount. If you have more than one variable, use the pull-down menu to select the variable name.

Sets the variable to specified value. Shows the variable monitor on the stage. Hides the variable monitor so it is not visible on the stage. Click to create and name a new list.

When you create a list for the first time, the list blocks will appear. You can choose whether the list is for all sprites (global) or just for one sprite (local).

%FMFUFT UIF CMPDLT BTTPDJBUFE XJUI UIF MJTU Reports all the items in the list. (The items are separated by spaces. However, if the items are individual letters or digits, spaces are omitted.)

Adds the specified item to the end of the list. The item can be a number or a string of letters and other characters.

%FMFUFT POF PS BMM JUFNT GSPN B MJTU You can specify which item


Shows the variable monitor on the stage.

BLOCK DESCRIPTIONS

Hides the variable monitor so it is not visible on the stage. Click to create and name a new list.

When you create a list for the first time, the list blocks will appear. You can choose whether the list is for all sprites (global) or just for one sprite (local).

%FMFUFT UIF CMPDLT BTTPDJBUFE XJUI UIF MJTU Reports all the items in the list. (The items are separated by spaces. However, if the items are individual letters or digits, spaces are omitted.)

Adds the specified item to the end of the list. The item can be a number or a string of letters and other characters.

%FMFUFT POF PS BMM JUFNT GSPN B MJTU You can specify which item to delete by choosing from the pull-down menu or typing in a number. Choosing “last� deletes the last item in the list. Choosing “all� deletes everything from the list. Deleting decreases the length of the list.

Inserts an item at the specified position in the list. You can specify where to insert the item by choosing from the pull-down menu or typing in a number. Choosing “any� inserts at a random place in the list. Choosing “last� adds the item to the end of the list. The length of the list increases by 1.

http://scratch.mit.edu

20

REFERENCE GUIDE


BLOCK DESCRIPTIONS

REFERENCE GUIDE Replaces an item in the list with the specified value. You can specify which item to replace by choosing from the pull-down menu or typing in a number. Choosing “any” replaces a random item in the list. The length of the list does not change.

Reports the item at the specifed position in the list. You can specify which item to report by choosing from the pull-down menu or typing in a number. Choosing “any” reports a random item in the list.

Reports how many items are in the list. Reports true if the list contains the specified item. The item must match exactly to report true.


Meta volante 6: Guarda el proyecto con el nombre “Pong_SegundaParte”. Realiza las y 3. Entalelcomo escenario ciones necesarias para hacer queescenarios la bola marque1,su2trayectoria se puede 3 debe detenerse. Crea un objeto como en la siguiente imagen. Observa cuadros que cada vezdequelalasiguiente pelota rebota, se incrementa imagen paraelque cuando el auto lo toque, el programa s grosor) del lápizEXAMPLE y se cambia el color.

ar esto utiliza las siguientes instrucciones:

5.1.8. ¿Qué debes hacer para que los objetos se vean sólo en el esce corresponde? Es decir, cuando el carro más veloz pase al segundo escenario aparecer el otro carro y el avión. Explorar posibles soluciones:


7,4, 6, $, 5, "%&'()(*+*,*-,.-/0-.12,! $, luego relaciona (cada !" número con la 4, a los siguientes3,programas y figuras, letra

6,

PROGRAMMING DATA

! pondiente) qué programa produce cuál figura. Por último, prueba los procedimientos en ! $"%&'()(*+*,*-,.-/0-.12, ! !" h. za los siguientes programas y figuras, luego relaciona (cada número con la letra ! ! spondiente) qué programa produce cuál figura. Por último, prueba los procedimientos en ! ch. !

5, !" 5, !"#"$"%&'()(*+*,*-,.-/0-.12, ! 4,

$,

8,

!

!

!

6, #, 6,

4, 7,

! !

8,

Analiza los siguientes programas la letra ! !" ! y figuras, luego relaciona !(cada número con ! correspondiente) qué programa produce cuál figura. Por último, prueba los procedimientos en ! ! ! Scratch.

!

!

9,

!

!

5, 3,

!!

7, 7,

!

#,

!"

!

!!

8, 8,

!

$,

erno de Trabajo: http://www.eduteka.org/GuiaAlgoritmos.php!

7,

8,

#, #,

!

5,

#,

6,

!

!

!

!

8,

6,

!

!

!

!

9,

9,

!

!

!

Pág.68 !- febrero de 2010 - Segunda6, Edición - Descargue este Cuaderno de Trabajo: http://www.eduteka.org/GuiaAlgoritmos.php!

8,

Pág.68 !- febrero de 2010 - Segunda Edición - Descargue este Cuaderno de Trabajo: http://www.eduteka.org/GuiaAlgoritmos.php!

8,

9,

! !

!

! !

!

Pág.68 4, !- febrero de 2010 - Segunda Edición - Descargue este Cuaderno de Trabajo: http://www.eduteka.o

!

!

!

!

9,

!

! !

!

!

6,

4, !

!

!

Pág.68 !- febrero de 2010 - Segunda Edición - Descargue este Cua

4,

6, !

!

!

!


Realiza los programas necesarios para plasmar en Scratch los dibujos que imaginaste. Ejemplo: Ejemplo:

ANIMATION PROGRAMMING )(*%*$+$,*-./0102$304$5367839:

volante 1: Con esta actividad desarrollaras la habilidad para crear historias El primer paso consiste en reproducir en Scratch la siguiente imagen.

!"#$%&'()#()*+&','(-./'%#&&-)'(#0(10-(2'&-(*$-,#03

a imagen anterior el diálogo atropellado entre dos personajes (ambos emiten su mismo tiempo; la niña habla y el perro piensa). La escena es fija, es decir, cuenta una sola imagen. Utiliza la opción “Importar” para cargar el fondo del escenario “Escoger un nuevo objeto desde archivo” para cargar los objetos. Estos se disponibles en las carpetas de Scratch. No utilices el editor de pinturas para

Pág.69 !- febrero de 2010 - Segunda Edición - Descargue este Cuaderno de Trabajo: http://www.edu

Pág.69 !- febrero de 2010 - Segunda Edición - Descargue este Cuaderno de Trabajo: http://www.eduteka.org/GuiaAlgoritmos.php!


Construye un avi贸n de papel paso a paso y en forma ordenada. Luego es pasos, para explicarle a otra persona c贸mo elaborarlo.

!"#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.