Skip to content
Lesson 1 of 9 Free Preview
Duration: 15 min

Events: Things That Happen

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 clicked
  • when [space] key pressed
  • when this sprite clicked
  • when 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

  1. Give the cat 3 different event scripts: flag, space key and click.
  2. Make each do something different.
  3. Test all three.

Challenge: Add a ‘when backdrop switches to’ script that makes the cat say where it is.

Enjoying this lesson?

Enroll in the full course to access all lessons, track your progress, and earn a certificate.

Enroll in Full Course