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 Change Up your Racetrack


Racing around the same old track all day could get pretty boring. Use this add-on to change up the venue for your racing sprites. In this video, you’ll learn how to add a button that you can program to change between the three racetrack backdrops available in the starter project. Watch how it’s done first, then try it on your own.

To start, choose a sprite to be the button for this project, for example, “button 1” like you see here. You can choose any sprite you want for your project.

This button is pretty large, so use the shrink tool to make it smaller, and drag it into the corner of the project. Next, program the button to change backdrops.

Click on looks, select the “switch backdrop to” block, and change the value to “next backdrop.” The backdrops now change when the block is clicked.

Finally, add an event that tells the computer to run this code. The backdrop should change when the sprite is clicked. To make that happen, add a “When this sprite clicked” event.

Try it out! Remember, it’s important to test your code at every step along the way--that’s what computer scientists do to make sure everything is working the way they want it to.

Awesome, the user can click this button to choose a backdrop.

When you are finished, add instructions to the project page to tell your users how to use the new feature. Now, it’s your turn: Add a sprite. Change the backdrop using a “switch backdrop” block and a “when sprite clicked” event.

Choose an Add-On
Change Up your Racetrack
Add a button that changes the racetrack backdrop.
Costume Change
Change what the racers look like when a key is pressed.
Step on the Gas (Part 1 of 2)
Change how fast the racers move, then make them slowdown on the grass.
Step on the Gas (Part 2 of 2)
Change how fast the racers move, then make them slowdown on the grass.
Crashing Sounds
Play a crashing sound each time the racers hit each other.
Race Fans
Program a sprite to count down to the start of the race and cheer.
Color Trail
Add a colorful trail effect to the racers.
arrow_backward Back
Next arrow_forward
  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!