Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By : Michael Badger
Book Image

Scratch 2.0 Beginner's Guide: Second Edition

By: Michael Badger

Overview of this book

Table of Contents (18 chapters)
Scratch 2.0 Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – displaying happy birthday


Can you imagine mom's confusion? She clicks on the green flag, and the screen goes blank. That's like going to a play where all the actors are sitting on the stage in front of the curtain until show time. Then, when the curtain goes up, all the actors disappear. However, we don't go to the theater to watch an empty stage. We want actors. Without further fuss, let's introduce our sprites:

  1. Let's bring out the Happy Birthday sprite first. Select the Happy Birthday sprite from the sprite list.

  2. From the Control palette, add the wait (1) secs block to the existing script to create a bit of delay and to allow the Happy Birthday sprite to display.

  3. Before we show the sprite, let's set the default size, adding the set size to () block. I set the size to 300, but your design may require a different value. The value inside the set to () block is a percentage.

  4. Show the sprite by adding the show block from the Looks palette.

  5. Run the script by clicking on the green...