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

Adding graphic effects to backgrounds


In Chapter 2, Storytelling, we explored adding a few different graphics effects to sprites. In this recipe, we are going to work on similar concepts with the background. This recipe will be similar to the last, in that we are implementing blocks that are very similar to what we've used in previous techniques.

Getting ready

Open a new Scratch project, and import a backdrop. If you want to mimic what we do here, we'll be using the desert background under the Nature category. We won't need to do anything with our sprite for this recipe, so the default cat is fine.

Tip

As a good programming practice, delete the white background when you've imported a new one. If you don't plan on using something at all, it is good to keep it out of the program. This keeps your program clean (which makes it more efficient to run) and easier to read for others.

Ultimately in this recipe we're going to have the user press buttons on the stage to change the graphic effects of the...