Tag Archives: broadcast

Animated Dragon in Scratch

In Scratch programming, the broadcast block lets you coordinate events, so that one event triggers one or more new events. That’s a bit of an obtuse explanation. What’s an event?

Let’s make up a quick example and assume you call me on the phone.

Event: You dial my number.

Message: My phone rings .

Event: When I hear my phone ring, I pick up my phone and look at the caller ID .

Event: “Oh, I know that number,” I think. I answer the call.

Message: I say, “hello.”

And on it goes.

The following Scratch video shows you the broadcast concept using an animated, fire and ice breathing dragon.  When the author clicks the “Fire” button, the dragon breathes fire (an orange flame). Click the “Ice” button and the dragon breathes the blue flame.  Not much different conceptually than making a decision about which phone call to answer.

The code snippets in the video are not readable,  but it does a good job of demonstrating the broadcast concept. I’m personally more enthralled with the actual animation of the dragon, which is one of the primary reasons for sharing.

Recently, @Moodlegirl followed me on Twitter (@mike_b), and as I was looking through tweets,  I found this Scratch video.

Scratch Workshop – Narrate a Slideshow

This workshop asks you to collect several photos that you will then build into a narrated slideshow. I originally presented this workshop at Scratch Day Pennsylvania at Abington Friends School on May 16, 2009.

Collect five, ten, or more digital photos to use as the destinations on the tour. You’ll use these photos to build a walking tour with the following components:

  1. Create a slideshow that lets you navigate through each photo. You should be able to navigate to a “home” photo and the next photo.
    • Tips & Concepts: Treat the photos as backgrounds and assign a sequence to them.
  2. Add a tour guide that takes you through the tour. The guide should walk across the stage when you navigate to the next photo. Synchronize the action.
    • Tips & Concepts: Use the stage’s coordinate system to know when the guide goes “off screen” and to know where to place the him when the group arrives at the next stop. This step uses broadcasts and conditional statements.
  3. Narrate the tour with text or audio. Make the tour guide speak about each destination.
    • Tips & Concepts: Broadcasts and conditional statements help you keep time here too. Experiment with the ways for the sprite to present the information to the group by recording your own audio.
  4. In real life, we’re not magically teleported from one destination to another. If you want to mimic reality, just a little bit, add a transition scene that your tour guide passes through.
    • Tips & Concepts: The goal in this step is to pick one background to use as a transition between each stop. That means you need to use a variable to track the background number, so you can tell your tour guide when to walk, stop, and talk.

Example

Download the code for this project.