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 Bounce Around

Transcript

In this add-on, you'll make your sprite move across the screen, pause, bounce up and down, and then move off the screen for your music video.

First, choose a sprite that you want to use like the convertible in this example.

You can either add a new sprite to your project or just look on the one that you already have.

With your sprite selected, go to the more blocks menu and click make a block.

Name this block bounce.

When naming a block bounce, will make you do anything, no.

You still need to add code to the defined bounce stack to tell the computer what the new block should do.

To make your sprite bounce, add several blocks from the motion, control, and looks menus.

Remember, as you build the code, it is a good idea to test it a few times along the way to make sure it does what you want.

The code shown here will make your sprite show if it's hidden, tell the sprite to start on the left side of the stage, make your spite move across the stage from left to right, made your sprite bounce up and down ten times in the middle of the stage, although you can set the number to any value you like, and make your sprite exit the stage and hide it so they should no longer see it.

Now that you've defined a bounce block, you need to make sure to use it and tell the computer when to run it.

Add a when flag clicked block and a forever loop to this sprite if you don't already have one.

And then drag out your new bounce block into that loop.

Try that out.

(smooth music)

Cool.

When the flag is clicked, the music starts playing, the convertible drives across the screen, bounces, and then drives off.

Now it's your turn.

Make a new block and then define it with the blocks you see here to make your sprite bounce.

Remember, in order to create this new procedure, or new block, you should make sure all these blocks are snapped together and attached to the defined bounce block so you can add it to your music video.

Choose an Add-On
Dizzy Sprite
In this add-on, you will make a spinning sprite.
Color Change
In this add-on, you create cool color change effects.
Bounce Around
In this add-on, you will create a block that programs your sprite to bounce around the stage.
Dance Fever
In this add-on, you will give your sprite some dance moves.
Make Some Magic
In this add-on, you will create some sprite magic.
Squeak
In this add-on, you will add a sprite with cool movement effects to appear and hide on the stage.
Background Change
In this add-on, you will switch up the background.
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!