Learning Goals 3 min
By the end of this lesson you will be able to:
- Use switch backdrop to [...v] to move a story from a kitchen scene to an open-house scene.
- Build short scripts on multiple sprites so each character says the right thing in each scene.
- Click the green flag and watch a Hari Raya open-house story play out from start to finish.
Warm-Up 7 min
Last lesson, you drove a cat around the Stage. Today you direct a tiny film — two scenes, three characters, one flag click.
Quick-fire puzzle
Nurul snapped this stack onto a parent cat sprite. The cat starts in a kitchen backdrop. Predict — what does the cat do when the green flag is clicked?
when flag clicked
say [Selamat Hari Raya!] for (2) seconds
wait (1) seconds
switch backdrop to [open-house v]
Reveal the answer
The parent cat says "Selamat Hari Raya!" for 2 seconds while standing in the kitchen, waits 1 second, then the backdrop changes to the open-house scene. The cat is still there — but everything behind it has switched. That's a "cut" — like in a film. Scene 1 ends, scene 2 begins.
New Concept — backdrops as scenes 15 min
A backdrop is the painted background that fills the Stage. Every project starts with one plain white backdrop. Switching backdrops changes the whole scene at once — like flipping the page of a picture book. Combine that with each sprite saying or doing the right thing at the right time, and you have a story.
The blocks we'll snap together
| Block | Category | What it does |
|---|---|---|
| when flag clicked | Events | Starts a script when the green flag is pressed. |
| when backdrop switches to [open-house v] | Events | Starts a script the moment a chosen backdrop appears. |
| switch backdrop to [open-house v] | Looks | Changes the Stage's backdrop to the chosen one. |
| say [Selamat Hari Raya!] for (2) seconds | Looks | Pops up a speech bubble for a set time. |
| next costume | Looks | Flips the sprite to its next costume — a one-frame animation. |
| show / hide | Looks | Makes a sprite appear or disappear on the Stage. |
| wait (1) seconds | Control | Pauses the script for a set time — gives the audience a moment to read. |
| start sound [Meow v] | Sound | Plays a chosen sound — without waiting for it to finish. |
The Stage layout — two scenes
Scene 1 is the kitchen — Mum prepares the food. Scene 2 is the open-house — guests arrive and a plate of ketupat says hello. The same sprites stay on the Stage; only the backdrop and what they say change.
Why it matters
Backdrops are how every multi-scene Scratch story works. Once you can switch scenes with one block, you can build endless little films: a Chinese New Year visit, a school sports day, a trip to Pasar Pagi.
Worked Example — build the two-scene story 15 min
Open Scratch. You'll set up two backdrops and three sprites, then write five short scripts. Each stack stays ≤ 6 blocks.
Step 1 — Add two backdrops
Click the Stage panel (bottom-right). Click the Backdrops tab at the top of the middle column. Click "Choose a Backdrop" twice — pick one indoor scene (rename it kitchen) and one outdoor or party scene (rename it open-house). Delete the default "backdrop1".
Step 2 — Set up the parent cat
Click the cat in the Sprite list. Rename it Parent in Sprite Properties. Set x = -100, y = -40, Size = 80.
Step 3 — Add a child cat sprite
Click the cat-plus icon → "Choose a Sprite" → pick another cat-like sprite (or duplicate the parent and rename the copy). Rename it Child. Set x = 60, y = -50, Size = 60.
Step 4 — Add a ketupat sprite
Click the cat-plus icon → "Paint" (the paintbrush) or pick a food sprite. Rename it Ketupat. Set x = 160, y = -40, Size = 60.
Step 5 — Parent script: start in the kitchen, switch the scene
Click the Parent in the Sprite list. Build:
when flag clicked
switch backdrop to [kitchen v]
say [Selamat Hari Raya!] for (2) seconds
wait (1) seconds
switch backdrop to [open-house v]
Step 6 — Child script: hidden in scene 1, visible in scene 2
Click the Child in the Sprite list. Build two short stacks:
when flag clicked
hide
when backdrop switches to [open-house v]
show
say [Salam Aidilfitri!] for (2) seconds
Step 7 — Ketupat script: also hidden in scene 1, talks in scene 2
Click the Ketupat in the Sprite list. Build two short stacks:
when flag clicked
hide
when backdrop switches to [open-house v]
show
start sound [Meow v]
say [Eat me!] for (2) seconds
next costume
Step 8 — Click the green flag and watch the story
Click the green flag. Scene 1 (kitchen): Parent says "Selamat Hari Raya!" Then a one-second pause. Scene 2 (open-house): the backdrop flips, Child appears and greets, and the Ketupat plays a sound, says "Eat me!", and changes costume.
What changed: compared to last lesson's real-time chase game, this project plays a scripted sequence. Time and order matter — every wait and every backdrop switch is a director's cut.
Try It Yourself — extend the project 12 min
Goal: Make the Parent change costume between the two scenes. Add next costume just before the backdrop switch — so Mum is "smiling" by the time the guests arrive.
when flag clicked
switch backdrop to [kitchen v]
say [Selamat Hari Raya!] for (2) seconds
next costume
wait (1) seconds
switch backdrop to [open-house v]
Think: Costume change in one block — Mum looks different in scene 2 without you adding a new sprite.
Goal: Add a third scene. Load a third backdrop called kampung. Extend the Parent script to switch from open-house to kampung after another wait.
when flag clicked
switch backdrop to [kitchen v]
say [Selamat Hari Raya!] for (2) seconds
wait (1) seconds
switch backdrop to [open-house v]
wait (3) seconds
switch backdrop to [kampung v]
Think: Each switch backdrop to [...v] fires the matching when backdrop switches to [...v] hat on any sprite that has one. Add new dialogue to the kampung scene by giving any sprite a when backdrop switches to [kampung v] hat.
Goal: Make the Child walk in at the start of scene 2 instead of just appearing. Use a glide from off-stage right to the centre.
when backdrop switches to [open-house v]
go to x: (240) y: (-50)
show
glide (2) secs to x: (60) y: (-50)
say [Salam Aidilfitri!] for (2) seconds
Think: Combining motion + a backdrop hat lets characters enter a scene like in a real cartoon — not just teleport in.
Mini-Challenge — add a sound loop for the open house 5 min
"Hari Raya song in the background"
Find a short, looping sound in the Scratch sound library (try Drum Tabla1 or Drum Bongo). Make it start when scene 2 begins, and play in a forever loop so the open-house feels alive.
It works if:
- Scene 1 (kitchen) is silent.
- The moment the backdrop switches to open-house, a percussion sound starts.
- The sound loops as long as scene 2 is showing.
- You used today's when backdrop switches to [...v] hat plus a forever loop from earlier lessons.
Reveal one valid solution
On the Ketupat sprite (or the Stage itself), add a separate stack that runs only when scene 2 starts. Use play sound [Drum Tabla1 v] until done inside a forever loop so the sound restarts itself each time it ends.
when backdrop switches to [open-house v]
forever
play sound [Drum Tabla1 v] until done
end
The until done form is important — without it, the sound starts again every frame and produces noise. With it, each sound finishes before the next one starts. Click the red stop sign to silence everything when you're done.
Recap 2 min
Today you built a two-scene story. One sprite directed the scene change with switch backdrop to [...v]. Other sprites listened with when backdrop switches to [...v] and acted at the right moment. Short stacks across many sprites — the recipe for every Scratch story.
- backdrop
- The painted background of the Stage. Each project can hold many backdrops and switch between them.
- switch backdrop to [name v] (block)
- A Looks block that changes the Stage's backdrop to a chosen one — used to "cut" between scenes.
- when backdrop switches to [name v] (block)
- An Events hat that runs a script the moment a chosen backdrop appears.
- scene
- One backdrop + the sprites visible during it. Switching backdrops moves the whole story to the next scene.
Homework 1 min
Your own festival story. Pick a Malaysian festival you like — Chinese New Year, Deepavali, Christmas, or Hari Gawai — and build a two-scene story for it. Same shape as today's project: scene 1 = preparing, scene 2 = celebrating.
- Open Scratch and create a new project.
- Add two backdrops, named after your two scenes (e.g. home and temple for Deepavali, or street and fireworks for CNY).
- Add at least two sprites. Give each one a short script (≤ 6 blocks) so they greet the audience in scene 2.
- Test by clicking the green flag once. Watch the whole story play.
- Take screenshots of both scenes and your sprite scripts.
Bring back next class:
- Screenshots of both scenes from your story.
- Your written answer: "Which sprite was the hardest to script — the one driving the scene change, or the ones reacting to it?"
Heads up for next class: SCR-L01-46 Planning on Paper takes a step back. Before building the next project, you'll sketch sprites, backdrops, and scripts on paper first — a real coder's planning trick.