Please update your browser
Your browser version is not supported by this site. CS First may not work properly.
In this add on,
we'll draw a sun, then program it to appear in your story.
To start, click the paint new sprite button,
naming it Sun.
Scratch has two images modes.
New sprites start in vector mode.
Vector images are easier to edit.
Next, create the center of the sun drawing.
Click the ellipse tool, then select a border color.
This example uses white.
Then, click and drag to draw an ellipse.
To create a circle, hold the shift key while dragging.
To redraw the shape, click the undo button
or select the shape, then press the delete key
on your keyboard and try again.
Next, color the ellipse.
Select the fill tool and a color for the sun.
The gradient options may look nice
for the center of the sun.
You can flip the gradient,
add some sun beams to make the sun look like it's shining.
Click the rectangle tool and select the color option.
Draw a rectangle above the circle.
To make the beams look like they're radiating
out of the sun, reshape them.
Click the reshape tool and drag the points
closet to the sun a little closer together.
Now that you have one beam,
you can copy it to reuse over and over.
To do this, select the beam, copy it,
click the shape, and drag the copy to a new position.
Rotate, move the shape, until it fits around the sun
in a way you like.
Repeat this until the sun has beams all the way around it.
The drawing process might be challenging at first,
but remember that you can always use the undo button
and delete shapes to retry.
Making mistakes is an important part
of the learning process.
Next, program the sun to go to the back
of your animation and to slowly appear.
Click looks, and drag out a go back layers block.
The sun should be layered behind the other sprites,
so set the value of this block to a large number,
and click to run it.
This example I used is a value of 10.
Click and drag to move it.
Program the sun to slowly appear using the ghost affect.
Find the set effect block and change that value to ghost.
Click to run it.
The ghost effect is set to zero,
so it doesn't change the appearance of the sun.
Change the value to 100 and click to run it.
A ghost effect of 100 is completely transparent.
To make this sprite slowly appear,
start with a ghost effect of 100, and gradually decrease
the value until it reaches zero.
Drag out the set ghost effect to 100 block.
To make the effect decrease so the sun
gradually becomes visible, drag out a change effect by block
and select ghost.
The ghost effect will start at 100 and decrease
repeatedly by one until it reaches zero,
so change the value to negative one.
To repeat this, add a repeat block.
To make the repeat block decrease the ghost effect
until it reaches zero, change its value to 100.
Click to run the code.
Great, the sun slowly appears.
Finally, decide when to run this code.
Click the events menu, this example makes the sun appear
when the flag is clicked,
but you can choose any event you like.
Now it's your turn.
Create a new sprite, use the ellipse, fill,
rectangle, reshape, and duplicate tools to create a sun.
Program the sun to appear using go back, set affect,
repeat and change affect blocks.
Choose any event you like.