arrow_back Opening Curtain
This add on will walk you through how to program an opening curtain for your fashion show.
First, add the curtain image to your project. To do this, download it from the "images" link or copy it to your backpack from the "Additional Images Project" link on the add-on page. To learn how to add images to your Scratch project, watch the "Upload Images" video by clicking on its link on the add-on page. Like your model, you’ll want to curtain to go to spot on the screen, then glide off screen, then hide.
Drag out a “go to” block from the motion menu. This program will use the middle of the stage as a starting point for the curtain. The “go to” block will have (0,0) as x and y coordinates. Next, drag your curtain sprite to where you want it to glide. This example will drag the curtain sprite to the very top of the stage.
Now drag out a “glide” block, and snap it to the bottom of the “go to” block.
Click this block stack. You may need to tinker with the values for an even glide. Next, you’ll want the sprite to disappear once it glides off stage and reappear to start your program every time the green flag is clicked. Drag out a “hide” block from the looks menu and place it at the bottom of the “glide” block. The hide block will hide a sprite. In contrast, a show block will show a sprite if it isn’t appearing on the stage.
Add a “When flag clicked” event block from the Events menu and a “show” block from the looks menu to the top of your block stack.
Try it out!
Whenever the green flag is clicked, the curtain goes up, and your fashion show begins!
To give a delay so the curtain doesn't’ disappear too soon, add a “wait” block between the “go to” and “glide” blocks. Tinker with the value in the “wait” block to however long you want your curtain down before your fashion show begins. This example will have the curtain down for 1.5 seconds before beginning the fashion show.
Now it’s your turn! Add a new curtain sprite from the CS First website to your Scratch project. Then, make your curtain go up before your fashion show begins using the show, go to, wait, glide, and hide blocks. Don’t forget to add a “when flag clicked” event block to start your show!
If you have a question, put your sticky note to the get the attention of your CS First guru!