Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
In this add-on, you'll play
a tune and use graphic effects like Mosaic and Color
to make your program more entertaining.
To start, add a new backdrop.
Click the stage, and the backdrops tab.
Choose a backdrop from one of the options.
Next, change this backdrop using an effect.
From the looks menu, drag the change
effect block into the scripts area.
Click the dropdown to see the different choices.
Select an effect, and click the block to try it out.
To reset the backdrop, click the
clear graphic effects block in the palette.
Select color, and click on the block.
This block changes the stages color.
Make this effect happen over, and over with a loop.
A loop is a block that repeats the action inside it.
Click the control menu, drag a forever loop
around the change effect block.
Click the stack to try it out.
The colors keep changing.
To run this code at the start of
the program, place a when flag clicked block
at the top of the stack.
Make your project more exciting by adding a sound.
Click the sounds tab, and choose sound from library.
Listen to a few sounds.
(playing sound selection)
When you find a sound you like,
click on it, select the scripts tab,
and from the sounds menu, drag
a play sound until done block into the script's editor.
From the dropdown, select the sound you chose.
Click on the block.
(sound selected plays)
Drag out a forever loop, to make the sound repeat.
Now that's a sweet beat.
If your sound loop doesn't sound right,
make sure you use a play sound until done block.
The play sound until done block
will play the sound all the way through,
before running any other code.
The play sound block, on the other hand,
will run the next block while the
sound is still playing, which may sound awkward in a loop.
Finally, add a when flag clicked block
to the top of the stack.
Click the flag to start your program.
The backdrop color changes, and the
sound you added repeats over and over.
Now it's your turn.
Change the backdrop's look by selecting the stage
and using the change effect block.
Add a sound by clicking on the sounds tab,
and using a play sound until done block.
Add forever blocks to each block stack,
to run the code over and over.
Finally, add when flag clicked blocks
to the top of the block stacks.