Skip to main content
Informatik.uz
Chapter 2. Programming in Scratch

Events, Costumes and Sound

Event blocks make a program respond to the keyboard and mouse. By switching costumes we bring a sprite to life, and we add sound.

Topic 8 of 111 min readUpdated October 27, 2026
All topics (8 of 11)

An event is an action that starts a program: clicking the flag, pressing a key or clicking a sprite. Every script begins with one of the blocks from the Events category, for example “when green flag clicked”, “when ... key pressed” or “when this sprite clicked”.

Every sprite has one or more costumes. Costumes are versions of how the sprite looks, for example different positions of a cat’s legs. The “next costume” block switches them one after another and so brings the sprite to life. This block is in the Looks category.

A script to make the cat walk: attach “change x by 10” and “next costume” to a “when right arrow key pressed” block. Now each press of the right arrow makes the cat take a step and change its legs. For the left arrow, write a separate script that changes x by −10.

Sound makes a project more fun. The “play sound ...” block from the Sound category plays a sound from the library or one you recorded. For example, if you add “play sound Meow” to a “when this sprite clicked” script, the cat meows when you click it. Too much sound can be distracting.

Key takeaways

  • An event is an action that starts a script.
  • Every script begins with an event block.
  • Switching costumes brings a sprite to life.
  • Sound blocks add audio to a project.

Practice tasks

  1. Build two scripts that move the cat with the right and left arrow keys.
  2. Write a script in which clicking a sprite plays a sound and changes its costume.
  3. Come up with a “when space key pressed” script that makes the sprite jump up (change y, then change it back).

Review questions

Test yourself: think first, then reveal the answer.

  1. 1What is an event? Give examples.
    An action that starts a script: clicking the green flag, pressing a key or clicking a sprite.
  2. 2What are costumes for?
    To change a sprite’s appearance and bring it to life.

0 of 11 topics completed

Sign in to mark
Informatika 6-sinf darsligi muqovasi
In the textbookInformatics — Grade 6