Skip to content

Please update your browser

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

arrow_back Spinning Celebration

Transcript

The sprite will spin and change color.

To get started, click the sprite you want to program.

Next, from the events menu, drag out a "when this sprite is clicked" block.

Click the sprite. Right now, nothing happens, because there is no code under this event to tell the sprite to celebrate.

To make the sprite spin when clicked, select the motion menu, then place a “turn” block under the "when this sprite is clicked" block.

To make the sprite change color when clicked, add a "change color effect" block to the code stack.

Now, when you click the sprite, it turns fifteen degrees and changes colors once.

If you want the sprite to change colors multiple times and spin in a complete circle each time it is clicked, snap a "repeat" loop around the "turn" and "change color effect" blocks.

In this example, the sprite turns 36 degrees and changes color effect by 25 ten times. This happens so fast that it looks like the sprite is making one, continuous 360 degree turn.

Experiment with the values in the “turn,” “change color effect by,” and “repeat” blocks until you achieve the sprite celebration you want.

Choose an Add-On
Spinning Celebration
Program a sprite to spin and change color when a user clicks on it.
Shout it Out
Program the sprites to react when a particular sprite is selected.
Shrinking Sprite
Make one of the sprites shrink if the mouse touches it.
Secret Votes (Challenge)
Make the vote count for each sprite secret.
Pick Me (Challenge)
Make a sprite demand to be picked whenever the mouse-pointer touches it.
Extra Cool Factor (Challenge)
Program sunglasses to fall from the sky onto your favorite sprite's face.
arrow_backward Back
Next arrow_forward
Instructions
  1. Choose an Add-On, and click "watch" to learn how to build it.
  2. Once you finish one Add-On, try another one below the video!