To move an object WHEN CLICKED.
To stop an object from moving when the background is clicked.
I can program a character to move WHEN CLICKED.
I can use the WHEN CLICKED feature and explain what it does.
I can use the STOP button to stop the character moving when the background is clicked.
Last week, you created a background and added in a character/s that moved automatically when the green play button was clicked.
In today's lesson, you'll be using the WHEN CLICKED button. When you drag this button in, a drop down menu comes down and you can either click on the character or the background to start the character moving.
Now, let's practise what you've learned.
when we press the WHEN CLICKED button, the character moves but it keeps on moving. We now want the character to stop. Can you add a code to make the character stop when the background is clicked (apart from pressing the red square “stop” button as this stops the whole programme).
Create a new Free code activity using the WHEN KEY button or the WHEN SWIPED button with a background and a character moving. You can add more characters and use WHEN CLICKED WHEN SWIPED and WHEN KEY buttons.