Skip to content

Please update your browser

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

5. Présentation finale


In this video, you’ll learn how to showcase your fitness gadget at the end of the commercial.

This is how fitness companies get you to buy their product. They remind you of the product that they are selling so that it’s fresh in your mind the next time you go shopping.

To use this same tactic, click on the showcase sprite, drag out a “show” block and connect it to a “go to front” block. This moves this sprite in front of the other sprite.

Drag a “set effect” block to the scripts area. Select “ghost” from the dropdown menu, and change the value to 100. When you click on the block stack, the sprite disappears.

A ghost value of 100 makes the sprite invisible. Click on “clear graphic effects” in the looks menu to make the sprite reappear. Click on the block stack again so that the sprite remains invisible. In order to create a slow transition effect that causes the sprite to reappear gradually, drag out a “change effect” block and select “ghost” from the dropdown menu. Then, place a “repeat” loop around the “change effect” block.

Click on the block stack to test. Wait nothing happens! That’s because the ghost effect ranges from 0 to 100, and the effect has already been set to 100 using the previous block.

Change the value in the “change effect” block to negative 2, then click on the block stack. The showcase sprite starts to appear. Sweet! Clicking on this stack a few more times allows the showcase sprite to fully appear on the stage. To avoid clicking the block stack 5 times to make the sprite fully appear, change the value in the “repeat” loop to 50.

Clicking on the “go to front” block stack hides the showcase sprite, and clicking on the “repeat” block stack makes it reappear. Connect these two blocks stacks to make these two actions happen one after another. Test it out. Sweet!

To make your fitness gadget fade out after a while, duplicate the “repeat” loop, and change the “ghost” effect to positive 2. Now throw a “wait” block between these block stacks, and set the value to however long you want the gadget to remain on the screen. This example uses 5 seconds.

Test it out. Great! The fitness gadget fades in, shows for 5 seconds, then fades out.

To personalize your project, click on the costumes tab, and add the name of the fitness gadget along with a tagline.

Feel free to change the color of the backdrop so that your fitness gadget really pops at the end of the commercial! This code stack is a module. Give it a name by dragging out a “when I receive” block and adding a new message like “Showcase Product.” Finally, tell your program when to run the “Showcase Product” module. Click back to the athlete sprite, and drag out another “broadcast and wait” block. Select “Showcase Product” from the dropdown menu. Then, place it when you want the product showcase to appear. In this example, the product will showcase at the end of the commercial, so this block goes under the other “broadcast” blocks.

Here's the game plan: Use “show” and “go to front” blocks to make the showcase sprite stand out. Use “set effect,” “change effect by,” “repeat” loops and “wait” blocks to create a transition effect.

Add “broadcast and wait” and “when I receive message” blocks, so your code will run after the introduction.

arrow_backward Retour
Suivant arrow_forward
  1. Utilise les blocs "Montrer" et "Envoyer au premier plan" pour faire ressortir le lutin Présentation.
  2. Utilise les boucles "Mettre l’effet", "Ajouter à l’effet", "Répéter" et des blocs "Attendre" pour créer un effet de transition.
  3. Ajoute des blocs "Envoyer à tous et attendre" et "Quand je reçois le message" afin que ton code s'exécute juste après l'introduction.