Learn it
An event is something that happens, like a click or a key press. Event hat blocks wait for their event, then run.
when green flag clickedwhen [space] key pressedwhen this sprite clickedwhen backdrop switches to [ ]
๐งฐ Tool: free Scratch online editor (no account needed to try; a parent can create one to save projects) or the free ScratchJr app for tablets.
Code examples
Blocks (Scratch)
when [space] key pressed
say [Boing!] for (1) seconds
when this sprite clicked
next costume
Two event scripts in one sprite: each waits for its own event.
Project: Event explorer
- Give the cat 3 different event scripts: flag, space key and click.
- Make each do something different.
- Test all three.
Challenge: Add a ‘when backdrop switches to’ script that makes the cat say where it is.