Posted on

How to Teach Kids to Program an Interactive Christmas Card

Imagine family and friends opening an interactive Christmas card – created by your child! It is much easier than you think and children as young as 3rd grade should be able to manage this feat with minimal adult help. For younger children, parents can get involved in the fun!

How-to-teach-kids-to-program-an-interactive-Christmas-card in Scratch

Here is exactly how to use the Scratch programming language to create the Christmas card – in 10 easy steps!

Step 1: Go to the Scratch website

Go to the Scratch website and create an account.

Step 2: Start your interactive Christmas Card

Click on ‘create’ in the menu bar at the top of the screen (close the tutorial that shows up by clicking X)

Step 3: Select a backdrop

At the top (where the red arrow is) type in a name for your project. Then go to where the purple arrow is pointing and click to select a backdrop. I chose “winter”.
(Note: next to the option to select from their library are options to draw your own background, upload from a file, or take a photo with the computer’s camera – so if your children are more ambitious they can try one of these)

Christmas Card programmed in Scratch

Step 4: Remove the default sprite

Click on the trash can next to the cat to delete the cat (the default sprite) – unless you want him on the card.

Step 5: Add your first sprite

Click on ‘Choose a sprite’ (the cat face) and select one from the library (once again you could draw your own, upload a picture from a file or use the computer’s camera to take a photo). I chose a penguin.

This penguin sprite comes with many scripts –  these tell the sprite what you want it to do. You can currently see all the blue “Move” scripts, but if you click on one of the other colors you can see those categories of scripts.

Step 6: Make a dancing penguin

The different scripts (pieces of code) in Scratch will click together like a jigsaw puzzle. Make sure they do as if they aren’t connected, the code will be ‘broken’ and not work. Copy the script I have here by clicking on Events, Control, Looks, and Motion to find the blocks you need. Follow the colors to find them

If you select the wrong script by mistake – no problem – just drag it back to where you got it and it will disappear!


This script tells the penguin sprite to repeat 5 times the following sequence:

In Scratch, a costume is a variation on the appearance of a sprite and you use it when you want to animate sprites. Not all sprites have costumes but if they do you will find them when you click on the Costumes tab. Here you can see our penguin sprite has 3 costumes.

The effect of letting him move and then change costume makes it a more fun animation. Click on the penguin now – the one in the right panel – and you will see him dance. If he does nothing, check you have the code EXACTLY like mine and that all the pieces are properly joined together.

Step 7: Add a ringing bell

Now it is time to add another sprite. Follow the same steps as when you added the first one. I chose a bell this time. Drag it to where you want it to be on the screen. Here is the code to make the bell ‘ring’ when clicked. You can click on the “down arrow” to select ‘xylo1’ or leave it as ‘bell toll’.

Step 8: Add a blinking star

Add another sprite – you know how to do that by now. I used a star. These scripts will make it blink. Be sure you have the star sprite clicked before you add the scripts (see the red arrow). There will be a purple box around the sprite the scripts apply to.

These script wait briefly (.5 seconds), hide the star, wait briefly (.5 seconds), and then reshow it, and this repeats 5 times. Please note you need to change the value of the numbers. Just overtype with the values you want.

Step 9: Add a talking gift

Add your final sprite – I chose a gift. Then make it “talk” ie when it is clicked, add words to say “Happy Christmas” or whatever you want to say.

Step 10: Share with family and friends

Now it is time to save and share. Click on Files and then ‘Save’ (the red arrow) and then click on Share (red arrow). If you don’t share a project no one can see it!

Add some instructions on the project page like I did (red arrow) and finally grab the url (purple arrow) and email that to whoever you want to send it to!

Now just sit back and wait for the recipients to be impressed. Or – challenge yourself and try to create some variations to make your interactive Christmas card even better! Try to make a sprite change color or size perhaps.

And if your children love coding in Scratch, consider gifting them an online Scratch class for Christmas!

Bio:

Meryl van der Merwe started programming as a teen and worked as a computer programmer before becoming a homeschool mom. She has been teaching live and online programming classes – and other subjects too – for over 10 years. You can find her online classes at FundaFunda Academy. Follow her on Facebook, Pinterest and Instagram.