Learning Goals 3 min
By the end of this lesson you will be able to:
- Use
switch backdrop to [backdrop1 v]from any sprite’s script. - Explain why a backdrop block works from the cat as well as from the Stage.
- Guarantee a project always opens on the right backdrop.
Warm-Up 7 min
Your kampung has two backdrops, and the only way to switch between them is to click one by hand in the Backdrops tab. An audience watching your project cannot do that.
Quick-fire puzzle
Priya put this script on her cat, not on the Stage. She expected an error. It worked perfectly. Why?
when flag clicked
switch backdrop to [Stars v]
Reveal the answer
Backdrop blocks are available to every sprite, not just the Stage. There is only one Stage in a project, so there is never any ambiguity about which backdrop you mean.
That is genuinely convenient. The character who walks into a new scene can be the one who changes the scenery.
New Concept — scene changes from code 15 min
In a theatre, somebody backstage pulls a rope and the set changes. In Scratch, any script can pull that rope — and the audience sees the world change without anyone touching the editor.
Blocks reference
| Block | Category | What it does |
|---|---|---|
switch backdrop to [backdrop1 v] | Looks | Changes the Stage to the named backdrop immediately. |
next backdrop | Looks | Steps to the following backdrop, wrapping after the last — exactly like next costume. |
If those look familiar, they should. This is the third time this arc has handed you a pair of blocks you already understand from somewhere else — costumes taught you both of these in Lesson 26 and 27.
One Stage, many scripts
Because there is only one Stage, a backdrop block on any sprite affects the same thing. That means two sprites can both try to change the scene, and the last one to run wins.
In a small project this is convenient. In a bigger one it is a source of confusing bugs, which is why it is worth deciding early which sprite is in charge of scene changes.
Backdrops stick, like everything else
By now this should be predictable. Whatever backdrop was showing when a project stopped is the one showing when it starts again. If your story begins in the morning, something has to say so at the top of a script.
That is the fourth kind of state you have had to reset: position, size, costume, and now the backdrop.
Why it matters
A backdrop change is the cheapest scene transition in existence. One block moves your audience from a kampung to a night sky, or a kitchen to a jungle, with no animation to build at all.
Worked Example — morning becomes night 15 min
We make the kampung change around the cat, and then fix the two problems that always come with a scene change.
Step 1 — Make the change happen
On the cat, build a script that waits and then switches to the night backdrop.
when flag clicked
say [What a lovely morning.] for (2) seconds
wait (2) seconds
switch backdrop to [Stars v]
say [Where did the day go?] for (2) seconds
Step 2 — Run it twice
The first run is fine. The second one opens at night, because the backdrop stayed where the first run left it — and the cat cheerfully announces what a lovely morning it is under a starry sky.
Step 3 — Reset the world at the top
Add a switch to the daytime backdrop as the first thing after the hat.
when flag clicked
switch backdrop to [Farm v]
say [What a lovely morning.] for (2) seconds
wait (2) seconds
switch backdrop to [Stars v]
say [Where did the day go?] for (2) seconds
Step 4 — Look for the second problem
Run it again and watch the hen. It stands in the field looking exactly as bright and cheerful at midnight as it did at noon, because nothing told it the scene had changed.
A backdrop switch changes the Stage and nothing else. Every sprite carries on regardless, which is easy to forget and very obvious once you see it.
Step 5 — Let a sprite react to the change
On the hen, build a script that hides it when night falls — a chicken going to roost.
when flag clicked
show
wait (4) seconds
say [Time to roost!] for (2) seconds
hide
Step 6 — Watch the whole thing
Morning: cat and hen in the field. Night falls, the hen goes to roost, the cat is left alone under the stars. Two scripts, eleven blocks, and it reads as a story with a passage of time in it.
Step 7 — Notice what is holding it together
Nothing connects those two scripts except the numbers you chose. The hen has no idea the backdrop changed — it simply waits the right length of time. That fragility is worth knowing about now; Level 2 fixes it properly with broadcasts.
What changed: your project can move between settings on its own, which means it can have scenes rather than just one continuous moment.
The full assembled scripts (your reference)
when flag clicked
switch backdrop to [Farm v]
say [What a lovely morning.] for (2) seconds
wait (2) seconds
switch backdrop to [Stars v]
say [Where did the day go?] for (2) seconds
when flag clicked
show
wait (4) seconds
say [Time to roost!] for (2) seconds
hide
Try It Yourself — three small builds 12 min
Goal: Make a key press change the time of day, so the audience can flip between morning and night themselves.
when [n v] key pressed
switch backdrop to [Stars v]
when [d v] key pressed
switch backdrop to [Farm v]
Think: two scripts, two keys, and the audience controls the sky. Backdrop blocks work under any hat, exactly like every other block.
Goal: Make a sprite react to the new setting rather than ignoring it — someone who behaves differently at night.
when flag clicked
show
wait (4) seconds
say [Time to roost!] for (2) seconds
hide
Think: the hen never checks the backdrop — it just counts. Everything holding this together is your arithmetic, which works fine until you change a timing somewhere else.
Mini-mission: three times of day. Add a third backdrop and build a story that passes through all three in order, with at least one sprite behaving differently in each.
It works if: one flag click passes through all three settings in order, at least one sprite behaves differently in each, and a second run looks identical to the first. Keep each stack within 8 blocks.
Think: three settings means three timings to coordinate across every sprite. What is the easiest thing to write down before you start building?
Mini-Challenge — the reliable opening 5 min
“However it ended, start it right”
Build a project that always opens in exactly the same state — right backdrop, right cast, right positions — no matter how the previous run finished or where it was interrupted.
It works if:
- Running the project three times gives three identical openings.
- Interrupting a run with the stop sign and clicking the flag again still gives a correct opening.
- Every sprite’s visibility and position is set, not assumed.
- The backdrop is set explicitly at the start.
Reveal one valid solution (teacher)
when flag clicked
switch backdrop to [Farm v]
show
set size to (100) %
go to x: (-140) y: (0)
The stop-sign test is the one that catches people. Pupils reset for the case where the project ran to completion, and forget the case where it was cut off halfway — which is how most projects actually get stopped.
Recap 2 min
A backdrop switch changes the Stage instantly, and any sprite can do it because there is only one Stage to change. Backdrops stick between runs like everything else, so a story with a setting needs that setting declared at the top of a script. And a scene change moves the scenery only — every sprite carries on exactly as before unless you tell it otherwise.
- switch backdrop to
- A Looks block that changes the Stage to a named backdrop. Usable from any sprite.
- next backdrop
- Steps to the following backdrop, wrapping after the last — like next costume.
- Scene change
- Moving a story from one setting to another. In Scratch, one block.
- Opening state
- The backdrop, positions and visibility a project sets before anything else happens.
Homework 1 min
The schedule. Plan a timed scene change on paper before building it, then check the build matches the plan.
- Write a schedule: what happens at 0 seconds, and at every moment after that.
- Build each sprite’s script from your schedule, matching the waits to the times you wrote.
- Run it and check every event lands when your plan said it would.
- Screenshot your schedule and one Script Area.
when flag clicked
switch backdrop to [Farm v]
say [What a lovely morning.] for (2) seconds
wait (2) seconds
switch backdrop to [Stars v]
say [Where did the day go?] for (2) seconds
Bring back next class:
- Your written schedule and your screenshot.
- Your answer to: “If you added one second to the cat’s first line, which other sprites’ scripts would you have to change, and why?”
Heads up for next class: SCR-L01-32 turns this into a proper two-scene story with a beginning, a middle and an end.