How Can We Help?

Use Codey to Make Sprites Play Instruments

Use Codey to Make Sprites Play Instruments

This project combines stage programming with Codey.

Before we start, please pull the Mode Switch to Live Mode.

1) Drag an Events block when button () is pressed.

image

2) When Button A is pressed, we want the sprite to receive the message. We need to add an Events block broadcast (). Click to create a new message “A”.

image

image

3) Add a new sprite. Under “Sprites”, click “+”. From the pop-up Sprite Library window, choose “Drum” and click “OK”.

image

image

4) Make sure “Drum” is selected. Drag an Event block when I receive (). Add a Sound block start sound () and keep the default “high tom”.

image

image

image

5) Apply some animation effect to “Drum”. Add a Looks block switch costume to (), and set the costume as “drum-b”. Add a Control block wait () seconds, and change the value to 0.2. Add another Looks block switch costume to (), and set the costume as “drum-a”.

image

image

image

6) Save your project. Press Button A to see what happens!