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 – hiding the table of contents


For navigation, we want to give users the ability to click on an item from the table of contents to play the scene. The user can then click back to the table of contents by clicking on a home link.

  1. Let's get back to the plain white background that represents our table of contents. Hide the Dog2 sprite. With the stage selected, click on the Backdrops tab. Select the blank white backdrop.

  2. Display the Dog TOC, Horse TOC, and Instructions sprites by right-clicking on each one from the sprites list and selecting show.

  3. We're going to make the Dog TOC sprite clickable, so select the Dog TOC from the sprites list.

  4. From the Events palette, drag the when this sprite clicked block into the scripts area. Add a broadcast () block to the script and create a new broadcast message, hide toc, because clicking on the Dog TOC button will cause the dog scene to load and all visible sprites on the table of content page to hide.

  5. Next, add a hide block to the script.

  6. The...