Introduction to Scratch
Scratch is a visual programming language that allows students to create their own interactive stories, games and animations. As students design Scratch projects, they learn to think creatively, reason systematically, and work collaboratively. Scratch was created by the Lifelong Kindergarten group at MIT Media lab and is available for free download at https://scratch.mit.edu/download Once Scratch is downloaded to a computer, you do not need Internet access to create a project.
Downloading Scratch
Go to the Scratch website at http://scratch.mit.edu. From the home screen, click on
Starting Scratch
1. Click on the scratch icon
To open Scratch, type “scratch” in the search bar and double-click on the Scratch icon. If Scratch is already installed on your computer, check the current version and update it if needed.
2. Elements of Scratch
There are four main elements of Scratch: the stage, the sprites, the script and the programming palette. These elements can be compared to a play.
1) Stage – similar to the stage in a play. This is where everything will take place. The stage can be different backgrounds, just like in a play. 2) Sprites – are the actors or main characters of the project. Sprites are programmed to do something in Scratch. 3) Script – tells the actors what to say or do. Each sprite is programmed with a script. 4) Programming palette – elements used to program the sprite to do or say something. Sprites must be programmed to carry out every function you want them to perform.
Programming a Sprite - Control, Motion, Looks and Sound
Control blocks
Programming a sprite ALWAYS begins with a control block (orange/yellow category from the programming palette). There are three blocks that can be used to begin programming: ,
,
1) When the green flag is clicked – The project will begin when the green flag in the upper right hand corner is clicked. 2) When space key is pressed – The project will begin when the space bar is pressed. The black drop down arrow indicates that you can choose a key different from the space bar; and that key will begin the project. 3) When sprite 1 is clicked – The project will begin when the sprite is clicked. Note: Click the sprite on the stage, NOT the small thumbnail sprite shown underneath the stage.
Drag the control block to the white scripting area. The next block will connect to this one like a puzzle piece.
Motion blocks
Motion blocks fall under the blue category. There are several blocks that will allow the sprite to move. This category teaches students to understand positives and negatives and other mathematical concepts, like degrees.
1)
– the sprite will move X number of steps. You can change the value whenever there is a fillable white area in a programming block. For example, 10 steps can be changed to 25 steps. Positive values move forward (to the right) and negative values move backward (to the left).
2) Glide__sec to x:_ y:__ - The sprite will glide to a specified position in X seconds. Remember: the more seconds you use, the slower/longer it will take the sprite to glide across the stage. Find a position on the stage that you would like the sprite to glide to and then move it there. Above the scripts area, you will find X and Y positions. Use these values to fill in the X and Y area on the glide block. Be sure to use a (-) sign when necessary.
3) Go to x___ y:__ - this block is used to place the sprite at a specific position when the project begins, so you do not have to manually pick the sprite up and put it in that position every time you restart the project. For example, if the sprite glides when the green flag is clicked, it will move away from the beginning location. Instead of moving the sprite back to the spot where it originally began, you can program it to begin at that position.
Looks blocks
Looks blocks fall under the purple category of the programming palette. There are several blocks to control what you SEE the sprite say or how the sprite looks.
1) Say “hello” for 2 seconds – allows you to program the sprite to give a word bubble that “says” what you have typed. Because the white space is fillable, you can delete hello and type another message. Note: You will SEE the sprite’s message, not hear it because this block is under the looks category.
2) Switch to costume – If you click on the “Costumes” tab beside the word “Scripts,” you will notice that some sprites have more than one costume. You can program the sprite to switch costumes. If the sprite does not have another costume, you can always create your own by clicking copy and then edit (see page 6 for more about painting a sprite).
Sound blocks
Sound blocks, found in the fuchsia category, enable you to program your sprite to produce sounds or spoken words. To manage sounds, click on the “Sounds” tab next to the “Costumes” tab. From here, you can export, upload, or record new sounds. To export a sound, click “Sounds,” then “Export,” and create a new folder to store your sounds. If you already have a designated folder (e.g., animal, effects, human), simply double-click on it to save your sounds.
Choosing a new sprite
If you prefer not to use the Scratch Cat as your sprite, right-click on its thumbnail and select “Delete,” or simply click the trash bin icon attached to the cat’s thumbnail.
There are three ways to add a new sprite in Scratch: you can import an existing sprite, create one by painting, or choose a “surprise” sprite at random.
1) Paint a new sprite -
allows you to use the paint editor to create your very own sprite. You can use a paint brush, paint bucket, lines, circles and squares to create your sprite.
2) New sprite -
allows you to choose from sprites that are available in Scratch. Double click on one of the categories to find a sprite you wish to use.
3) Mystery sprite
– Scratch will choose a random sprite for you.
Choosing a background
To choose a new background click on the thumbnail that says stage. A blue line will appear around the box. Next, click on the “Backgrounds” tab beside the word “Script.” You can paint or import a background. If your computer has a webcam, you can also take a picture for the background.
1) Painting your own background – Click paint and then the paint editor will open.
2) Uploading a background – Click on Upload Background to choose from backgrounds available in Scratch and then double-click on one of the folders.
3) Importing a background
– Click on import to choose from backgrounds available in Scratch and then double-click on one of the thematic folders.