Skip to content

Please update your browser

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

arrow_back Out of this Ballpark


In this add-on, you will program the crowd to cheer if the batter hits the ball.

Scratch has two sound blocks: “play sound” and “play sound until done.”

When Scratch runs a “play sound until done” block, it plays the sound to the end before running the next block below it. When Scratch runs a “play sound” block, it starts playing the sound, then immediately runs the next blocks. It will stop playing the sound when it runs into a “play sound” block again.

To put your sound into a loop, use the “play sound until done” block. Whichever block you use, click the dropdown, and choose “cheer.” Consider where to place the “play sound” block to make the cheer happen when the batter hits the ball. Should it be inside the repeat loop or before or after it? Should it be inside the “if touching color red” block or before or after it? Keep tinkering and trying different things until you have something you like.

Computer scientists like you don’t always get things exactly right the first time. They use courage and persistence to keep trying and learning from their mistakes.

If you need help, ask a neighbor. If you still need help, ask a Host or Guru.

Here's the game plan: Use a “play sound” or “play sound until done” block to make the crowd cheer when the ball is hit.

Choose an Add-On
Program a celebration for when the batter achieves a perfect batting average.
Over the Plate
Make the baseball look more realistic as it approaches or moves away from the plate.
High Score
Tell the batter if it has beaten the best batting average so far.
Out of this Ballpark
Program the sound of a cheering crowd.
In the Big Leagues
Make the pitcher tell a story before the game starts.
Going through the Motions
Animate the pitcher so it looks like he or she is moving.
arrow_backward Back
Next arrow_forward
  1. Choose an add-on and click "Watch" to learn how to customize your project.
  2. When you finish, come back to the add-ons screen, and try another add-on!