< Return to Video

Sprites In Action

  • Not Synced
    Now that you've learned
    how to use Sprite Lab,
  • Not Synced
    you're going to want to make
  • Not Synced
    your program react
  • Not Synced
    when someone plays
    with it.
  • Not Synced
    To do that, you're going to
    use events.
  • Not Synced
    Blocks like `when clicked` and
    `while touches` are called event blocks.
  • Not Synced
    The code connected to
    an event block
  • Not Synced
    runs when the approprite input,
  • Not Synced
    like a click or a tap, is detected.
  • Not Synced
    For example, if you attach this
    `change size by` block
  • Not Synced
    to the `when Alien 1 clicked` event
    the sprite will change size when it's clicked.
  • Not Synced
    Notice that event blocks don't snap
    into your main program,
  • Not Synced
    they create little programs of their own.
  • Not Synced
    Remember that even if the event
    only happens one time,
  • Not Synced
    behaviors will go until you stop.
  • Not Synced
    You can use a `stops` block
  • Not Synced
    if you don't want multiple events
    to combine behaviors.
  • Not Synced
    Using events, you can create
    imaginative programs
  • Not Synced
    and interactive worlds.
  • Not Synced
    Give it a try!
Title:
Sprites In Action
Description:

more » « less
Video Language:
English
Team:
Code.org
Project:
CSF '21-'22
Duration:
01:46

English subtitles

Revisions Compare revisions