How to combine the Shrink and Hide Blocks

Today’s lesson in ScratchJr focuses on combining two Looks blocks to create a seamless disappearing animation: the Shrink block and the Hide block. This technique is perfect for simulating actions like a character entering a building, falling into a hole, or simply walking off-screen in a dynamic way.

Our project today demonstrates this by programming Kitten to buy groceries by walking towards a shop, shrinking as they approach (to give the illusion of distance/perspective), and then vanishing.

Setting the Scene and Characters

We need a background that includes a building and the main character.

  1. Change the Background: Select the city background, which features a shop. [00:22]
  2. Add Characters: Add the Shop character to the project. [00:34]
  3. Position Characters: Place the Shop on the right side of the screen and Kitten on the left, ready to begin their journey. [00:27]

We will only be coding the Kitten icon.

Coding the Sequence: Movement, Shrink, and Hide

The action is a sequential chain: Kitten moves, gets smaller, and then disappears.

  1. Start Block: Begin the script with the Green Flag trigger block (yellow category). [00:59]
  2. Movement: Go to the blue Motion category and add the Move Right block. [01:02]
    • Set Distance: Use the grid to set the number of steps (e.g., 13) so Kitten walks right up to the shop door. [01:39]
  3. Shrink: Go to the purple Looks category and add the Shrink block. This makes Kitten visibly smaller. [01:09]
  4. Hide: Immediately follow the Shrink block with the Hide block. This makes Kitten completely disappear. [01:16]
  5. End: Finish the script with the red End block. [01:20]

Running the Animation

When you press the Green Flag, the animation will run perfectly: Kitten moves across the screen, shrinks as they reach the shop, and then vanishes, simulating them entering the building! [02:14]

This is a great exercise in our coding tutorials for teaching children how to sequence commands to create a visual effect that is more complex than simple motion. For structured lesson plans, explore our collection of ready-made lessons. Happy coding!