Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
In this video, you'll program the ghost, pixelate, mosaic, and fisheye sprites to broadcast messages.
Then, you'll program the nature sprite to change its appearance when it receives each
of those messages.
The process for programming the rest of the button sprites is similar to the process you
just followed to program the color and reset buttons.
First, select the ghost sprite.
Add a "broadcast" block.
Click the dropdown menu, select "new message," and name the message something like "Ghost."
Add a "when this sprite is clicked block."
Next, select the nature sprite.
Add a "when I receive" block, and select the "Ghost" message you just created from the
Add a "change effect" block from the looks menu.
Click the dropdown menu to select the ghost effect.
Tinker with the value in the block until you get an effect you like.
This example sets the value to 10.
Whoa, that's super light.
Click the reset button to return the image to its original look.
Repeat this process for the other button sprites.
For the pixelate button, add a "broadcast" block.
Name the message "Pixelate."
Add a "when this sprite clicked" event to the top of the code stack.
Select the nature sprite, add a "when I receive" block, and select the "Pixelate" message.
Add a "change effect by" block from the looks menu.
Click the dropdown menu to select the pixelate effect.
When you click the pixelate button, it broadcasts a message.
When this message is received by the nature sprite, the pixelation effect is applied to
That's pretty cool!
Repeat this process for the mosaic and fisheye buttons.
Each button will broadcast a message, and the image sprite will receive the appropriate
message to change its look.
If you have a question while you are working, ask a neighbor for help or put up your sticky
note to get the attention of your Guru.
Now, all the button sprites broadcast messages to the image sprite when they are clicked.
The image sprite changes how it looks based on the message it receives..
In the next video, you'll find out how to change the image displayed in the program.
Now it's your turn: Program the ghost, pixelate, mosaic, and fisheye
sprites to broadcast messages when clicked.
Program the nature sprite to change ghost effect, pixelate, mosaic effect, and fisheye
effect when it receives those messages.