Skip to content

Please update your browser

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

3. Make Cassy Move


You now have Cassy dancing in one place, but people and characters usually move around when they dance. In this screencast, you will make Cassy move around the stage using the “glide” block. Just like last time, you’ll watch the steps first, then jump in and try them yourself. Click on the motion menu to see all the blocks that can be used to change Cassy's position on the stage. For this dance, use the “glide 1 second” block. In this example, watch what happens when you drag the “glide” block into the script editor. If you move Cassy somewhere on the screen, then click the glide block, Cassy will go back to the position she was in when the block was first dragged out.

When the code is not running, you can see that the “glide” block in the script builder says "glide 1 second to X: <read the number> and y: <read the number>." Those X and Y values represent Cassy's position on the stage. If you move Cassy, you'll see that the X and Y values change to reflect Cassy's new position on the stage.

To make Cassy move back and forth as she dances, put her in one spot on the stage, then drag out the “glide” block for that position into your script editor. Next, move Cassy to a second position on the stage, and drag out another “glide” block.

Try these two stage positions by clicking one “glide” block and watching Cassy move to the new spot, then clicking the other “glide” block to see her move slowly to the second spot. You can even reduce the value in the "seconds" field to make her move faster.

Once you are happy with Cassy's movement, place these two blocks inside the forever loop, with some “next costume” blocks in between. Now, Cassy both dances and moves!

Finally, click on the events menu and add a “when flag clicked” block to the top of the block stack. Doing this will make your project start when the flag is clicked. Now, it's your turn. Drag Cassy to a position on the screen where you want her to dance, then drag out the "glide 1 second” block, which will contain the X and Y coordinates. Move Cassy to a new position, then add another "glide one second" block. Add both blocks to your code stack and see if you like her dance. Remember, you can always try different values in the white value fields until you create a dance you like.

arrow_backward Back
Next arrow_forward
  1. Use the "glide" block to make Cassy move.
  2. Make the dance start when the green flag is clicked.