Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

2. Talking Artwork

Transcript

In this video, you will animate the mouth of a character from a painting.

Just like the project you made on day two, today's project will use next costume to animate a sprite.

In this case, the subject of a painting.

Select a subject, or sprite, to animate.

Each starter project contains sprites with multiple costumes.

Go to the Looks menu and drag out a next costume block.

Click on it a few times to see the sprite's mouth move.

It works!

You'll get pretty tired of clicking next costume over and over to make it look like the sprite is talking though.

To make something repeat a specified number of times, use the repeat loop.

Go to the Control menu and drag the repeat loop around the next costume block.

Click on the block stack to test it.

The sprite's mouth opens and closes 10 times, then stops.

Tinker with the number in the repeat loop to vary the number of times the sprite opens and closes its mouth.

Computer scientists rarely create perfect code the first time around.

After writing code, they keep trying new things and testing them until the code does what they want it to.

This example repeats 20 times, but you can use whatever number works for your project.

So, the sprite's mouth is moving, but it's moving too fast to look like natural speaking.

Drag out a wait block.

Tinker with different lengths of time the wait block.

This example waits for 0.1 seconds, but you can use any time that works for you.

Now it's your turn.

Animate your sprite using a next costume block, a repeat block, and a wait block.

Tinker with the values of the repeat and wait blocks until you're happy with your animation.

arrow_backward Back
Next arrow_forward
Instructions
  1. Animate the sprite using next costume, repeat and wait blocks.