In the core project,
you made the subject of the paintings mouth move.
In this add on,
you will learn how to make other parts of the painting
come to life when they are clicked.
First, create a sprite for another part of the painting.
To make sure this sprite blends in with the painting,
create it from a copy of the painting.
To do that right click on the painting,
then click duplicate.
This creates a sprite that is a copy of the entire painting.
Next, remove every part of the painting,
except the one you want to make come to life.
Go to the costumes tab, select the paintbrush,
and set it to invisible,
by clicking the paint that has a red line through it.
If the paintbrush is too big to complete some of the
little details on the painting, you can make it smaller.
When you've finished, you need to recenter the sprite.
To do that, place the center of the cross
on the center of the sprite you made.
When you are finished with that,
place the sprite on top of it's spot
in the original painting on the stage.
Next you will program what this new sprite will do
when it is clicked.
First, remove the code from the sprite you duplicated,
then add the code for this sprite.
In this example, the pitchfork moves left and right.
You can make your bit of the painting do anything you want.
It might move in a different way,
or even make a sound.
Use wait blocks to make the computer wait
to execute the code
until the user has had a chance to see what happens.
Test the code and tweak it until your sprite does
what you want it to do.
Finally, add the when this sprite is clicked
event block to the top of your code stack.
When you click on the sprite it performs
the action you programmed.
Now it's your turn,
copy the painting sprite and use the paintbrush to
remove all but one piece of the painting.
Move the remaining piece over it's original place
in the painting, then program the sprite to do something.
Create and animate new sprites from the painting.
Make sprites appear when the mouse is clicked.
Make sprites change from one painting to another.
Make the painting background twist.
Create dialogue between sprites. You can tell a happy, funny, or even sad story about what’s really happening in your painting.
Sign in to save your project and track your progress.