The aim of this puzzle: Make the balloon fall from a different position each time it gets tapped.
Walkthrough of the solution: The horizontal position of the balloon is controlled using the
'cx' attribute which can be set using the command
balloon.attr('cx',...). To get a random position, you want to use the
pickRandom() function and the
position is an array of numbers that can be used as
The Burst Your Bubble Puzzle should help you practice the skills you need to complete Pick It Up. When you solve it, try to figure out what each part of the code does and when the order of the function calls matters.
Sample code solution:
(Tap below to reveal)
Since this is part of the final topic of the Animations II course and it is testing your knowledge, there is no sample solution code.