Phases of the Moon in ScratchJr. A great mixture of coding and astronomy!

Every night, the Moon shows a different face in the night sky. On some nights we can see its entire face, sometimes it’s partially hidden, and on others it isn’t visible at all.

The ScratchJr animation below is very simplified, but it explains the basic mechanism of the changing lunar phases. You can also use it to teach what a “full moon” or a “new moon” is, etc.
A perfect coding activity to incorporate into your science lesson! 😊

Felling inspired? Let’s start coding!

Please note: the animation is very simplified and the actual mechanism of lunar phases is quite complicated. You can read more details here.

Instructions

The trick is to use solid navy-blue background and a round “shadow” character in the same color.
The “shadow” character blends with the background, so it’s not visible at first.

  1. Edit the background and fill it with solid color. Add the “Full Moon” character and place it in the middle.
Scratch junior moon phases step 1

2. Create a navy-blue circle character (the circle should be a little bit bigger that the Moon) and place on the right-hand side.

Scratch junior moon phases step 2 A
Scratch junior moon phases step 2 B

3. Now, it’s time to move our circle! As the “shadow” moves, it covers the Moon making it appear nearly or totally invisible.

The shadow should move a little bit, then wait; then move a little bit and wait again. The best way to achieve a functional animation is to repeat this movement in a loop. Here is the script:

Script of the shadow character.
Move the “shadow” character in a loop.

The animation is fully working now, but you can add some additional objects (a planet or some twinkling stars) to make it prettier.

Scratch junior moon phases final touch

Looking for other astronomy-flavored animations? Check the Moon orbiting the Earth post and learn how to move one ScratchJr object around another!

Have fun coding!

6 comments

  1. Ηello, i have a problem. Although I followed your instructions correctly, the shadow does not pass over the moon as it should. Could you please help me ?

      1. Hi, i finally made an another project. Thank you very much for being willing to help me. Ι really appreciate it.

Leave a Reply

Your email address will not be published.