There are many ways to move and animate
sprites in Scratch.
In this video, you will make the sprites
whirl to music.
To start, choose a sprite to program.
This example uses the G but you can use
any sprite you'd like.
Next, choose a song.
Select the sounds tab
and click choose sound from library.
The library contains sound effects
and music loops.
Select music loops and try a few.
Choose a sound you'd like
Next, program the sound to play.
Click code and select the sound menu.
Click, hold and drag out a play sound block.
Click the block to see what it does.
Next, program the letter to whirl or twist.
Select the looks menu,
and drag a change effect block
below the play sound block.
Change the value to whirl and click run.
The song plays and the letter whirls.
To make the letter whirl more, repeat the effect.
From the control menu, add a repeat 10 block
around the change effect block.
The repeat block is a type of loop.
It runs the change effect block 10 times.
You did it!
The letter whirls, but only in one direction.
Next, make it whirl back.
Press the stop sign to reset the effect.
Add another repeat block below the first one you added.
Then, add a change effect block from the looks menu.
Change the values to whirl and negative 25.
Try it out.
The letter whirls 10 times in one direction,
then it whirls 10 times the other way.
Next, add an event to tell the computer
when to run this code.
This example will use a
when this sprite clicked block,
but you can use any event you like.
You could run this code when you press a key
or click the flag.
To copy this code to other letters,
click, drag and drop the code onto another sprite.
Click the sprite to check that it copied correctly
and run the code.
Copy this code to as many sprites as you like.
Now it's your turn.
Select a sprite to program.
Select a sound from the sounds tab.
Add a play sound block.
Add two repeat 10 blocks and two change effect blocks.
Change the values to whirl.
Make one whirl a positive value,
and one a negative value.
Copy this code to as many sprites as you'd like.
Once you finish these steps, return to this page
to select another video.
Change the style of a letter each time it's clicked.
Tell a story with talking letters.
Add an image behind the logo.
Create an interactive logo by changing letter colors when a key is pressed.
Edit, draw, or add an image to change how a letter looks.
Turn your logo into a game where a letter chases the mouse pointer.
Add a button that changes the scene behind your logo.
Make a letter spin.
Make your letters randomly move across the screen.
Play a sound as a letter disappears.
Make your letters whirl to music.
Animate your letters to make them bounce.
Sign in to track your progress and earn badges