It's Sean!

UK freelance journalist, author
and writer Sean McManus

Printed from www.sean.co.uk. © Sean McManus.

NEW: Sign up for my newsletter!

Home > Books > Scratch Programming in Easy Steps > 10 block demos > Ticklish dragon webcam demo

Ticklish dragon: How to use a webcam in Scratch

Sean McManus, author of Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps, shows you how to use a webcam to interact with a sprite in the Scratch programming language

when green flag clicks / turn video on / set video transparency to 50% / forever / wait until video motion on this sprite > 15 / switch costume to dragon1- b / play sound laugh-male1 until done / switch costume to dragon 1-a / forever ends

How to use this Scratch webcam example

  1. This simple demonstration only works in Scratch 2.0, so go to scratch.mit.edu.
  2. Connect the webcam before you go into Scratch.
  3. Add the sprite Dragon. It's in the Fantasy section of the sprite library.
  4. Add the sound laugh-male1. It's in the Human section of the sounds library.
  5. Add the blocks as shown above.
  6. When you click the green flag, you'll see the sprite, with yourself in the background, thanks to the webcam. When you touch the dragon, it changes to its fire breathing costume and laughs.

Feel free to share that image on your social networks, or to use it with your students or Code Club members!

Find out more...

Find more 10 block Scratch demos here. For more information on my Scratch books and more bonus content, visit the Scratch Programming in Easy Steps and Cool Scratch Projects in Easy Steps homepages.

Books by Sean McManus

Scratch Programming in Easy Steps

Scratch Programming in Easy Steps

Raspberry Pi For Dummies

Raspberry Pi For Dummies

Learn to program with the Scratch programming language, widely used in schools and colleges.

Set up your Pi, master Linux, learn Scratch and Python, and create your own electronics projects.

Coder Academy

Coder Academy

Cool Scratch Projects in Easy Steps

Cool Scratch Projects in Easy Steps

Learn to make games and other programs in Scratch 2.0, and make a web page in HTML, with this highly interactive book for 7-10 year olds.

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

More books

Recommended articles

Stylised coloured photo of a synth

Discover my music and home recording articles

Interested in starting home recording? Follow me as I start recording, using instruments such as the Novation MiniNova and Korg Kaossilator, and share my synth and sample-based music online.

Scratch cat and rainbow circle

10-block demos for Scratch programming

Lots of people of all ages are learning to program with Scratch. Discover some useful tricks and techniques in my 10-block Scratch demos, including special effects you can drop into your games.

Paper Raspberry Pi case

Download free book chapters and more!

Download a free case for your Raspberry Pi, and free chapters from my books about the Raspberry Pi, Scratch, web design and more!

©Sean McManus. www.sean.co.uk.