Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
Many plants and animals adapt to their environment to survive harsh weather conditions or hide
By making the sprites in you logo change colors, you can show how animals protect themselves
by changing their appearance to blend in with their environment.
This is called “camouflage.”
In this video, you will make the animal sprites change colors when a key is pressed.
To start, select a sprite to program.
This example uses the G, but you can use any sprite you like.
Next, program the sprite to change colors.
Select the looks menu.
Click, hold, and drag out a “change color effect by” block.
Click the block to see what it does.
Each click changes the color of the letter.
Next, program this block run when you press a key.
Select the events menu.
Events blocks tell the computer when to run code.
Drag out a “when key pressed block,” and attach it to the “change color effect”
Try it out.
Press the spacebar.
You can change the values in each of these blocks.
For example, make a letter pixelate when you press the G key.
Try different effects to see what works best for your project
Press the stop sign to reset the effect.
To add an effect to another letter, select the sprite, then add “When Key Pressed”
and “Change effect” blocks.
Now it’s your turn: Select a sprite to program.
Add “change effect” and “When key pressed” blocks.
Once you finish these steps, return to this page to select another video.