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 On to the Next One

Transcript

In this add-on, you will let the user scroll through different images using a keypress event.

To enable the user to change the costume displayed, select the “nature,” “people,” or “things” sprite, and add a "next costume" block from the looks menu to the scripts area.

Right now, the costume changes only if you click the block.

To allow the user to change the costume more easily, add a "when this key pressed" event from the events menu to the top of the code stack.

You can pick any key to make the costume change.

This example uses the right arrow key.

Try it out.

When you press the key you selected, the costume changes to the next costume.

This lets the user easily see the available images and try out the visual effects on different images.

Now, it's your turn: Program an image sprite to change costume when a key is pressed.

Choose an Add-On
On to the Next One
Enable the user to scroll through different images using a keypress event.
Custom Filter
Create your own unique filter.
Secret Item
Add a surprise feature to your program
Choose Image Category
Program a dropdown menu to give the user a chance to pick the image category displayed [Note: to complete this add-on, you'll need to have already programmed all three image sprites from 4. Choose Your Image.]
Talking Pictures
Make the images respond to specific effects.
Sound Effects
Add sound to your project.
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!