Skip to main content

Stage 1: Make a Button That Talks

Course progressStage 1 of 10
~45 min
Your workspace

Keep your Scratch project tab open all week. Open in a new tab so you don’t leave the course.

Build

a button sprite that plays a sound when you click it

Learn

how a sprite listens for a click and does something

Ship

your very first working soundboard button

Teacher demo

Before campers touch their iMacs, show the whole room — this whole demo is under a minute:

  1. Open your saved project. Click the Scratch Cat in the sprite pane.
  2. Go to the Code tab. From Events, drag in when this sprite clicked.
  3. From Sound, snap play sound (Meow) until done underneath it.
  4. Click the cat on the stage. It meows. Click it again — it meows again.

That's the whole heartbeat of a soundboard. One click, one sound. Tell the room: "Every button in every app this week starts with this."

The big idea

A soundboard is an app full of buttons, where each button plays a sound when you tap it. To build one, we need a sprite that can do one simple thing: notice when it gets clicked, and then make a noise.

In Scratch, a sprite is any character or button on the stage. Sprites can listen for things to happen — these are called events. The event we want is when this sprite clicked. It sits and waits. The moment you click the sprite, the blocks underneath it run.

Today we don't record anything yet. We use a sound that's already in Scratch — Meow — so you get the click-makes-a-noise magic working first. In Stage 2, we swap in sounds you record yourself.

A colorful original meme soundboard with six hand-drawn buttons
The tiny pattern behind the whole appA finished soundboard is just this first click-to-play button repeated with different drawings and different sounds.

There are two sound blocks that look almost the same, and the difference matters:

  • play sound (___) until done — plays the whole sound, start to finish, before anything else happens.
  • start sound (___) — kicks off the sound and moves on right away, so it can overlap with itself.

We start with play sound until done because it's the calm one: one click plays one clean sound.

New words
sprite
a button, character, or object on the stage
event
something a sprite waits for, like a click
when this sprite clicked
an event block that runs when you click the sprite
play sound until done
a block that plays a whole sound before moving on
soundboard
an app full of buttons that each play a sound
Before you start

Your Scratch project from Setup should be open — App Studio — First Last. It should still have the Scratch Cat sprite (Sprite1).

Build it

Step 1 — Pick the sprite that will be your button

In the sprite pane (bottom-right), click Sprite1 (the Scratch Cat) so it's selected. For today, the cat is our button. In Stage 3 you'll draw your own button art — for now, the cat does the job.

Make sure you're on the Code tab at the top-left.

Step 2 — Add the click event

From the Events category (the gold blocks), find when this sprite clicked. Drag it into the code area.

The click event (Events)

when this sprite clicked

This is a hat block — it sits on top of a stack and waits for the click. By itself it does nothing. We give it a job in the next step.

Step 3 — Add a sound to play

From the Sound category (the magenta blocks), find play sound (Meow) until done. Snap it directly under the click event so they connect.

Click, then play the sound

when this sprite clicked
play sound (Meow v) until done

Every new sprite already has the Meow sound, so the dropdown should already say Meow. If it doesn't, click the little arrow and pick Meow.

Step 4 — Test your button

Click the cat on the stage (not the blocks — the actual sprite on the white stage).

It meows! Click it again. It meows again. You just built a button that talks.

block

Click the sprite, not the green flag

This button runs on a click, not on the green flag. The green flag is for "start the whole app." A button is for "do this one thing when I'm tapped." That's why we test it by clicking the cat directly. Lots of campers click the green flag and wonder why nothing happens — the button only answers to a click on itself.

Step 5 — Save

Click File → Save Now. You've shipped your first button.

Understand it

The when this sprite clicked block is the single most important block in this whole course. Every button in your soundboard, every button in your voice changer, even the cookie in your clicker game — they all start with this exact block. Learn it once, use it all week.

We used play sound until done instead of start sound on purpose. With until done, one click gives you one clean, complete sound. If you mash the button fast, each meow politely waits for the last one to finish. With start sound, the meows would pile on top of each other in a noisy jumble. Sometimes that jumble is exactly the meme you want (you'll try it in Stage 2's stretch) — but for a first button, clean is better.

Notice we did all of this with two blocks. That's the secret of Scratch: real apps are just small, clear pieces stacked together. A soundboard with twelve buttons is just this two-block idea, repeated twelve times.

Try this

Learning beat

Try this

Three short experiments. Predict before you run, then test your guess.

Predict first

Before you click: if you tap the cat three times really fast, how many meows do you think you'll hear — three quick overlapping ones, or three that wait their turn? Try it. The until done block decides the answer.

Compare

Drag a second play sound (Meow) until done block so there are two in a row under the click event. Click the cat. How is it different from one block? What sound pattern did you just make?

Connect

Right now your button plays Meow — a sound that came with Scratch. In Stage 2 you'll replace it with a sound you record with your own voice. Which block do you think will need its dropdown changed when you do that?

Level up

Pick one quick upgrade before you test:

  • Level 1 — Button personality. Move the button to the center and make it bigger so it feels like something players are supposed to press.
  • Level 2 — Sound choice. Try two different Scratch library sounds and keep the one that gets the biggest laugh.
  • Level 3 — Press feedback. Add the hard stretch's next costume idea, then explain why a button that moves feels better than a button that only makes sound.

Debug mission

Make the classic beginner mistake on purpose: click the green flag and notice that nothing happens. Then click the sprite itself. Say the rule out loud: this app listens for sprite clicks, not the green flag.

Test your stage

  • Your sprite has a when this sprite clicked block.
  • A play sound (Meow) until done block is snapped under it.
  • Clicking the sprite on the stage plays the sound.
  • Clicking it again plays it again.
  • You can explain why the green flag does not run this button.
  • Your project is saved (File → Save Now).
  • Design check. Is the cat easy to click? A button that's tiny or hidden in a corner is a button nobody presses. Drag it somewhere obvious on the stage.

If it breaks

  • Nothing happens when I click. Make sure you clicked the cat on the stage, not the blocks in the code area and not the green flag. The button only answers to a click on itself.
  • I hear no sound at all, even though the blocks run. Check the iMac's volume, and check that the Meow sound is actually in the Sounds tab. If the dropdown is empty, the sprite may have had its sound deleted — go to the Sounds tab and Choose a Sound to add one back.
  • The blocks won't snap together. Drag the play sound block so its top bump lines up just under the when this sprite clicked block. You'll see a faint gray shadow when they're about to connect. Let go then.
  • I grabbed start sound instead of play sound until done. That's okay for now — it still makes noise. But swap it for play sound until done so your sounds stay clean. They're right next to each other in the Sound category.
Coach notes

The number-one confusion in this stage: campers click the green flag and expect a sound. This button runs on when this sprite clicked, so they have to click the cat itself. Say it out loud twice and walk the room — it clears up 90% of "it's broken" hands.

The number-two issue: grabbing start sound instead of play sound until done. Both make noise, so it's easy to miss. It won't matter much today, but it matters in Stage 5 (voice changer), so gently correct it now while there's only one block to fix.

This stage is short and should feel like a quick win — that's intentional. The recording (the real "meme" hook) lands in Stage 2. If campers finish in 15 minutes, push the medium stretch (a second sound); save the hard stretch (costume change) for the fast few, since it adds a second block to reason about.