How to Use the Start on Tap Block

Ready to give your child direct control over their animated stories? Today, we are introducing the Start on Tap block in ScratchJr. This essential trigger block allows a character’s programme to begin only when a finger physically taps it on the screen, creating interactive and responsive projects.

Our project today demonstrates this interactive control: Kitten is playing outside, but a storm cloud appears, and you must tap Kitten to make them run for shelter. This teaches children the difference between a programme that runs automatically (Green Flag) and one that requires user input (Start on Tap).

Setting the Scene and Characters

We need to establish the setting and introduce the two key elements: the character and the threat (the storm cloud).

  1. Change the Background: Select the woods background. [00:30]
  2. Add the Threat: Use the ‘Add Character’ button to find and select the storm cloud. [00:46]
  3. Position Characters: Place the storm cloud to the left of the screen and Kitten near the centre, ready to run away. [00:52]

Coding the Storm Cloud: The Automatic Threat

The storm cloud is the automatic sequence. It moves as soon as the Green Flag is pressed, adding tension to the scene. Ensure the Storm Cloud icon is selected.

  1. Start Block: Use the Green Flag trigger block (yellow category). [01:05]
  2. Move to Kitten: Use the Move Right block (blue category). Set the movement to 7 steps. This causes the storm cloud to move right until it is directly above Kitten. [01:38]
  3. End: Finish the script with the red End block.

Coding Kitten: The User-Triggered Escape

Kitten’s movement must only start when the user taps them, differentiating this script from the automatic storm cloud. Ensure the Kitten icon is selected.

  1. Start on Tap Block: Go to the yellow category and select the Start on Tap block (the character outline with a finger on it). [01:55]
  2. Move to Shelter: Use the Move Right block (blue category) to make Kitten run away to the right side of the screen. Set the movement to 10 steps to get Kitten far away. [02:24]
  3. End: Finish the script with the red End block. [02:18]

Running the Interactive Project

When you press the Green Flag, only the storm cloud moves across the screen. Kitten remains still, waiting for your input. [02:48]

Once the storm cloud is over Kitten, you must physically tap the Kitten character on the screen. This activates the Start on Tap block, and Kitten immediately runs away to safety! [03:04]

Mastering the use of the Start on Tap block introduces interactivity to your young coder’s projects, moving beyond simple animated stories into game design. This is a crucial skill in our coding tutorials. For more structured coding challenges, explore our comprehensive collection of ready-made lessons. Happy coding!