Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Scratch Cookbook

You're reading from   Scratch Cookbook If want to get your programming know-how off the starting blocks in a fun, involving way, then this guide to Scratch is perfect. In no time you'll be building your own interactive programs that include animations and sound.

Arrow left icon
Product type Paperback
Published in Jul 2013
Publisher Packt
ISBN-13 9781849518420
Length 262 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Brandon Milonovich Brandon Milonovich
Author Profile Icon Brandon Milonovich
Brandon Milonovich
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Scratch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Scratch FREE CHAPTER 2. Storytelling 3. Adding Animation 4. Basic Gaming 5. Spicing up Games 6. Bringing in Sound 7. Integrating PicoBoards 8. Programming to Calculate 9. Project Remixing Collaboration Index

Starting up Scratch


This first recipe to follow, which will help you download and install Scratch to your computer. Follow along and you'll be using Scratch in no time.

Getting ready

Our first recipe is all about getting Scratch up and running. Scratch can easily be used on any computer. Simply visit http://scratch.mit.edu/help/faq/ to see the requirements for Scratch. If you've used Scratch 1.4 before, you'll recall that you had to install Scratch on your computer. The Scratch creators have made it even easier to use Scratch 2.0. Now you can run Scratch directly within your browser. All you need is a recent browser and Adobe Flash Player!

Note

Although Scratch can be installed on Mac, Windows, and Linux, in this book all of the instructions will be tailored to using a Windows-based system with Scratch 2.0. The commands should be the same, just keep this in mind if you are using a different system.

How to do it…

To use Scratch 2.0, simply click on the Create link on the Scratch home page. If you want to use Scratch 1.4, follow these steps. The installer will create a link on your desktop for you as well as a Start menu shortcut. Follow these steps to download and install Scratch:

  1. Open your browser, and then visit http://scratch.mit.edu/scratch_1.4/ to download the version of Scratch you need.

  2. Click on the link to the appropriate version based on your operating system, as shown in the following screenshot:

  3. Depending on your Internet connection speed, it may take a couple of minutes for Scratch to download.

  4. Click on Yes on any prompts that come up confirming you want to open the file.

  5. The Scratch installer will open. Click on Next > to begin the install process.

  6. Next you'll be prompted to choose an install location. The default location will serve most people just fine.

  7. Click on Next >.

  8. Scratch will give you the option to choose a Start menu folder location. It will default to creating a new folder called Scratch. You may change this if you wish.

  9. Click on Install.

  10. Scratch will install, and then give you the following screenshot when finished:

  11. Click on Next >.

  12. The final screen will give you the Start Scratch and Make a shortcut to Scratch on the desktop options.

  13. Click on Finish and then you'll be ready to go!

How it works…

Once you're inside Scratch, play around with the interface. Scratch is broken up into three main areas that you'll be working in. These are called the Block Palette, Script Area, and Stage. These three areas are labeled in the following screenshot:

In Scratch 2.0, you'll see these areas in the following manner:

So, what are these three areas all about? How do I use them to build programs?

Each of these areas helps in a different way to build your program. The Block Palette is your library of commands, which you can add to your program. To build programs, all you need to do is drag and-drop these to your Script Area. Notice that there are eight categories of blocks. Each of these is color coded and does something different. We will explore more and more of these with each program we create!

The script area is vital to each individual program. A sprite is an object in Scratch we will program (usually characters). The default is the cat seen in the preceding screenshot. Each sprite as well as the background have their own Script Area, where you can drag blocks from the Block Palette. With more complicated programs, you need to drag more and more of these blocks to the Script Area.

A few examples of sprites you might use in your program are:

  • Characters for a story or game

  • Buttons to control things in your program

  • Things you want to display on the stage, maybe digits for numbers that need to have background programming

The last area of the Scratch interface is probably your favorite: the Stage. Here is where everything you've programmed comes together, and then you can see it in action. Just below the Stage is the collection of all the sprites you've added to your program, this is how you select those individual script areas we mentioned before. Once we get past our first program, most of the magic will happen after you click on the green flag up in the right-hand corner of the stage. You can also stop everything by clicking on the little red button next to the green flag.

See also

Now that you have a basic understanding of the interface of Scratch, we can move on to customizing some of the fun things we'll be programming. Our next recipe, Deleting the default sprite features importing, adding, and changing sprites. See the rest of the recipes in this chapter as well for further basic information you'll need to program with Scratch.

You have been reading a chapter from
Scratch Cookbook
Published in: Jul 2013
Publisher: Packt
ISBN-13: 9781849518420
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image