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 Change Profile Picture

Transcript

In this add-on, you will program the sprite to change its profile picture.

If you click on the Profile image sprite, you will see different costumes that came with the starter project.

As you click through the different costumes, the sprite on your starter project also changes its costume.

It doesn’t make sense for the user to click through the costumes to change them, but you can program this to happen using a keypress event.

To start, drag out a "next costume" block from the Looks menu.

Click it to test it out.

This block changes the look of the sprite by changing its costume.

Great.

To keep the user from having to keep clicking the block to change the costume, add a "when space key pressed" event.

Click the black triangle to change the keypress event.

This example uses the "right arrow" key, but use any event that works for your program.

Awesome.

When you test it by clicking the right arrow key, the sprite changes its costume!

Users are now able to customize the profile page by changing the look of the profile sprite.

Now, it’s your turn.

Click on the Profile sprite, and program it to change its look using the "next costume" block and the "when key pressed" event.

If you need help, ask a neighbor or put up your sticky to get the attention of your CS First Guru.

Choose an Add-On
+1 Button
Program a "plus 1" button so users can express that they liked your page.
Post a Shoutout
Code your program so that users can give a shoutout or share a post.
Pump the Jams
Add music to your profile page.
Change Profile Picture
Code your profile android to change its look
Ping
Program your friend's sprites to respond to your favorite stuff!
Hidden Feature
Code a surprising action on your profile page!
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!