Table of Contents
Scratch Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
More information
Conventions
Reader feedback
Customer support
Errata
Piracy
Questions
1. Getting Started with Scratch
Introduction
Starting up Scratch
Getting ready
How to do it…
How it works…
See also
Deleting the default sprite
Getting ready
How to do it…
There's more…
Adding a custom sprite
Getting ready
How to do it…
Adding a pre-made sprite
Getting ready
How to do it…
There's more…
See also
Changing the stage background
Getting ready
How to do it…
There's more…
See also
The Hello World project
Getting ready
How to do it…
How it works…
There's more…
Adding some motion
Special sprite settings
Pointing towards the mouse
Duplicating code
See also
2. Storytelling
Introduction
Adding words to a sprite
Getting ready
How to do it...
How it works...
See also
Adjusting the timing
Getting ready
How to do it...
How it works...
There's more...
See also
Sprites interacting with other sprites
Getting ready
How to do it...
How it works...
There's more...
See also
Basic broadcasting and receiving
Getting ready
How to do it...
How it works...
The broadcast block
The receive block
More about the code
There's more...
Triggering an event with a click
Changing the background
See also
Resetting parts of a program
Getting ready
How to do it...
How it works...
There's more...
See also
Other fun graphic effects
Getting ready
How to do it...
How it works...
There's more...
Fisheye
Whirl
Pixelate
Mosaic
Brightness
Ghost
See also
3. Adding Animation
Introduction
Changing sprite costumes
Getting ready
How to do it...
How it works...
There's more…
Making it dance
Checking the costume number
Switching to a particular costume
See also
Switching backgrounds in a story
Getting ready
How to do it...
How it works...
See also
Adding graphic effects to backgrounds
Getting ready
How to do it...
How it works...
There's more...
A finished message
Adding other effects
Animating the button
See also
Keyboard input to a program
Getting ready
How to do it...
How it works...
There's more...
Using better defined variables
See also
Getting the mouse position
Getting ready
How to do it...
How it works...
There's more...
4. Basic Gaming
Introduction
Creating a moving object
Getting ready
How to do it...
How it works...
There's more…
The simple way
Adding another ball
Getting ready
How to do it...
How it works...
There's more...
See also
Object interaction with a background
Getting ready
How to do it...
How it works...
There's more...
See also
User interaction with a game
Getting ready
How to do it...
How it works...
Using mouse control
Getting ready
How to do it...
How it works...
There's more...
Keeping score
Getting ready
How to do it...
How it works...
Objects disappearing
Getting ready
How to do it...
How it works...
See also
Building a maze
Getting ready
How to do it...
How it works...
There's more...
Using the timer
Getting ready
How to do it...
How it works...
See also
5. Spicing up Games
Introduction
Tracking the best score or time
Getting ready
How to do it...
How it works...
There's more…
Keeping a high score list
Getting ready
How to do it...
How it works...
There's more…
See also
Adding more levels
Getting ready
How to do it...
How it works...
There's more...
6. Bringing in Sound
Introduction
Playing sounds
Getting ready
How to do it...
How it works...
There's more…
See also
Importing a new sound
Getting ready
How to do it...
How it works...
There's more...