Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

Transcript

(upbeat music) In this add on, you'll program music that will play while your athlete showcase their favorite moves.

To get started, click on the sports commentator sprite.

Next, click on the sounds tab, then on choose new sound.

You'll find many different sounds here that you can use in your program.

There are different categories for sounds.

Click on the music loops category to see different music loops or short sections of music tracks.

(upbeat music)

When you find a song you like, click it.

You can now add the new sound you chose to your project.

To do that, click the scripts tab.

Click the sound menu and drag the play sound until done block into the script editor.

Make sure the sound you chose is selected in the drop down.

The play sound block plays a sound without pausing the rest of the code.

This block is mostly used for quick sound effects.

The play sound until done block, on the other hand, doesn't run the code below it until the sound finishes playing.

For this example, use a play sound until done block to prevent your background music from being cut short.

Since the music should play continuously during your performance, select a forever loop from the control menu and place it around the play sound until done block.

To make this code start at the beginning of your athlete's performance, add a when flag clicked event to the top of this code stack.

Click the flag to test your code.

(upbeat music)

Background music plays as your athletes perform.

(upbeat music)

Cool.

All right, here's the game plan.

Add a sound from the music library.

Add a play sound until done block inside a forever loop.

Don't forget to add the when flag clicked event so the music plays at the beginning of your athlete's performance.

Choose an Add-On
Music
Add music that will play while the athletes showcase their moves.
Showcase your Moves
Program the athletes to get active by moving around the stage.
Changing Colors
Make the sprites change colors similar to how athletes wear different jerseys.
In the Zone
Program the sports commentator to give the athletes a performance boost.
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!