Book Image

Scratch Cookbook

By : Brandon Milonovich
Book Image

Scratch Cookbook

By: Brandon Milonovich

Overview of this book

Scratch 2.0 is an easy to use programming language that allows you to animate stories and create interactive games. Scratch also gives you the capability of using programming to calculate complicated calculations for you. Scratch Cookbook will lead you through easy-to-follow recipes that give you everything you need to become a more advanced programmer. Scratch Cookbook will take you through the essential features of Scratch. You'll then work through simple recipes to gain an understanding of the more advanced features of Scratch. You will learn how to create animations using Scratch. Sensory board integration (getting input from the outside environment) will also be covered, along with using Scratch to solve complicated and tedious calculations for you. You'll also learn how to work through the exciting process of project remixing where you build on the work of others. Scratch Cookbook will give you everything you need to get started with building your own programs in Scratch that involve sounds, animations, and user interaction.
Table of Contents (17 chapters)
Scratch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Importing a new sound


Scratch comes with a variety of sounds built-in that we can use beyond the default meow sound. Here we will see how to access them and get them into our programs to be played back at various points.

Getting ready

Refer to the previous recipe to have the ability to play a sound in your program. You may also apply this recipe to another program you have already added sound to using your knowledge from the previous recipe.

How to do it...

Let's get started:

  1. You'll notice on the top of the script area there is a third tab we have not used yet called Sounds. Click on this tab. You'll see the following screenshot:

  2. Click on the Import button that looks like a speaker. The following dialog box will appear:

  3. Choose a category of sounds from the list of categories, this will open up a variety of choices of sounds to use.

  4. We'll import from the Music Loops category. Once you open a folder, you can click on the sound once to hear it previewed for you. We'll import cave into our program...