Skip to content

Please update your browser

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

Transcript

This add-on will show you how to make sprites spin and change colors.

For this example, the letters of CS First will spin and change colors.

But you can use these steps to make any sprite do this.

First, make the sprite change colors.

From the Looks menu, drag out the change color effect by block.

Click on the block to make the sprite's color change.

Then, click on it again.

To keep making the color change over and over without having to keep clicking the block, place a repeat loop around the change color by block.

Click on the code.

The color changes many times.

If you think the color changes too quickly, add a wait block from the Control menu.

Next, make the sprite spin.

From the Motion menu, select a turn block and place it inside the repeat loop.

Click on the block stack.

The sprite turns and changes colors.

Change how much the sprite changes color, how far it turns, and how many times it spins and changes color by tinkering with the values in the blocks.

If you want your sprite to be upright after it turns, make sure the number of degrees in the turn multiplied by the number of repetitions equals 360 degrees, or a complete circle.

In this example, 15 degrees times 24 repeats equals 360.

Finally, add an event to start your program.

This example uses the green flag.

Now it's your turn.

Make the sprite change colors using the change color by block.

Make the sprite turn using the turn block.

Make these actions keep happening using a repeat loop.

Wait if necessary, tinker with the values, and start the program with an event.

Choose an Add-On

Party Time!

Make sprites spin and change colors.

Now You See Me...

Using "show" and "hide" make the sprites in your project appear and disappear.

Stage Lights

Change the background based on user input.

Random Appearances

Make art elements appear randomly.

Triangles All the Way Down

Create a fractal with many little triangles.

Spirals

Learn how to create spirals.

Instructions
  1. Choose a recipient for your card, such as a parent, friend, Guru, or Host.
  2. Craft and code a message for that person about CS First.
  3. Create art to enhance your card and show off what you've learned in this club.
Attributions
  • "Crowd down the street" by Guillaume (https://www.flickr.com/photos/guiguibu91/2889883615) -- Licensed by CC BY 2.0 (https://creativecommons.org/licenses/by/2.0/) -- Image scaled up, cropping edges
  • "Greetingcards" by Sotakeit (https://commons.wikimedia.org/wiki/File:Greetingscards.jpg) -- Licensed by Creative Commons Attribution 3.0 Unported (https://creativecommons.org/licenses/by/3.0/legalcode) -- Image scaled up, cropping edges