We are all quite familiar with the green flag icon, but what is it actually doing when we use it to start a program? The green flag can in fact be seen as a special kind of broadcast. When we click the green flag icon at the top right of the screen this sends out a "message" that tells any script with a green flag hat block to start executing. You can think of the green flag button as a radio station broadcasting on a particular channel. Then only scripts who are tuned to that channel (i.e. have a green flag hat block) will receive the message. This same idea of message passing can be seen in the scripts below:

  1. when space pressed
  2. when up arrow pressed
  3. when I receive message
  4. when green flag clicked
  5. Note: Whether we start a script by clicking the green flag button, using broadcast, or through keyboard input we are always using message passing even though it may not always be obvious.