Skip to content
Transcript

Doodles often combine sound and visual effects to create an exciting animation.

In this video, you will program a sprite to play a sound while it disappears.

To start, select a sprite to program.

This example uses the "G," but you can use any sprite you'd like.

Next, program the sprite to disappear.

Then, select the “Looks” menu.

This menu contains blocks that change a sprite’s appearance.

Click, hold, and drag out a “change color effect by” block.

This block includes many different effects to choose from.

To make a sprite disappear, use the “ghost” effect.

Click the block to see what it does.

Whoa!

Each click makes the sprite disappear a little more.

To make the sprite reappear, click the stop sign.

Next, program the computer to repeatedly run this block.

Select the “Control,” menu.

Click, hold, and drag a “repeat” block around the “change effect by” block.

The “repeat” block is a type of loop.

It runs the “change effect” block 10 times.

Click the block to run.

Holy cow!

The sprite disappeared!

To make the sprite reappear using a code block, select the “Looks” menu, and add a “clear graphic effects” block.

Click the block stack a few times.

Great!

To change the speed of the effect, tinker with the values in the “repeat” and “change effect by” blocks.

This example uses 100 and 5, but use values that work for you.

Next, add a sound to play while this effect happens.

Select the Sounds tab, and “choose sound from library.”

Select a sound, and click OK.

("bell toll" plays)

("singer2" plays)

Then, select the “Scripts” tab and the “Sound” menu.

Drag out a “play sound” block, and place it on top of this stack.

Click the block stack to run.

("singer2" plays)

You did it!

Then, add an event to tell the computer when to run this code.

Select the “Events” menu.

This example uses a “when key pressed” block, but you can use any event you like.

You could run this code when you click the flag or click the sprite.

To copy this code to other sprites, click, drag, and drop the code onto another sprite.

Click the sprite to check that it copied correctly, then run the code.

("singer2" plays)

("pop")

Copy this code to as many sprites as you like.

Now it’s your turn: Select a sprite.

Add a “repeat” and “change effect by” block.

Change the value in the “change effect by” block to “ghost.”

Add a “clear graphic effects” block.

Select a sound from the sounds tab, and add a “play sound” block to the top of the block stack.

Add an event, like “when key pressed.”

Copy this code to as many sprites as you like.

Once you finish these steps, return to this page to select another video.

Choose an Add-On

Change Color

Create an interactive logo by changing letter colors when a key is pressed.

Say Something

Tell a story with talking letters.

Switch Costume

Change the style of a letter each time it's clicked.

Add Backdrop

Add an image behind the logo.

Edit, Draw or Add Letters

Edit, draw, or add an image to change how a letter looks.

Jumble Letters

Make your letters randomly move across the screen.

Chase

Turn your logo into a game where a letter chases the mouse pointer.

Spin

Make a letter spin.

Change Scene

Add a button that changes the scene behind your logo.

Dance Whirl

Make your letters whirl to music.

Bouncing Sprites

Animate your letters to make them bounce.

Disappearing Sprites

Play a sound as a letter disappears.

Instructions

  1. Watch the introduction video.
  2. Open the Starter Project below.
  3. Return to this page and watch more videos to customize your logo.
Attributions
  • "Doodle 4 Google 2012- Behind the Scenes with the Doodle Team" by Google (https://www.youtube.com/watch?v=i6RWpg7oVgc) -- Licensed by Standard Youtube License (https://www.youtube.com/static?template=terms)
  • "Google Doodle Team Q&A - Your Questions Answered!" by Nat & Friends (https://www.youtube.com/watch?v=IglWB66vn7g) -- Licensed by Standard Youtube License (https://www.youtube.com/static?template=terms)
  • "Who Was Lotte Reiniger, And Why’s There A Doodle About Her" by Nat & Friends (https://www.youtube.com/watch?v=MK1P6RGs6U4) -- Licensed by Youtube License (https://www.youtube.com/static?template=terms)