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 – adding a sound from Scratch's library


At the moment, we have a script that shows the next background when the user clicks on the Next arrow. Let's create a sound effect to signal the next slide:

  1. Select the Next sprite and add a play sound () block from the Sound palette to the script that starts with when this sprite clicked.

  2. You'll notice that the play sound () block uses a default pop sound. If you click on the Next arrow, you'll hear the sound play as the next image loads.

  3. Let's choose a new sound from Scratch's library. Click on the Sounds tab in the project editor to display a list of sounds associated with the sprite. Then, click on the Choose sound from library icon. Look at the following screenshot for reference:

  4. The Sound Library window will open and display a list of sound categories on the left-hand side. Select Effects and then select the ripples sound. Click on OK to add it to the Sounds tab.

  5. Click on the Scripts tab.

  6. Select ripples from the play sound (pop) block...