Category:World
Plays the given sound once. This block connects to a menu of sounds to choose from. Once a sound is chosen, its file name appears in the block.
Examples
Example 1
Play a happy sound whenever the sprite is clicked.
Example 2
Play sounds to indicate when different events happen.
Syntax
playSound
Parameters
Name | Type | Required? | Description |
---|---|---|---|
sound | The sound file that will be played |
Tips
- Avoid using sounds when
Defining Behaviors
as it can cause the chosen sound to start over continuously as if it is stuck or frozen. - The sounds are organized by category. Quickly find a sound by exploring a category or using the search bar in the top right of the menu.
Found a bug in the documentation? Let us know at support@code.org.