Unit 3, Lesson 14

Kristy,

Thanks for sharing.

  1. All candy pieces spinning until user clicks on one would just be a counter pattern in the draw loop like line 41 in the example.
  2. If you want the spinning to start when a key is pressed and continue, you need trigger a variable to change. That way it stays even if the key is not being pressed. Example in line 32 and line 46 &47.
  3. To make the other sprite appear when clicked, hide one with visible =false and show the other with visible = true. Example on line 42 to 44.
    Good luck!
    17 PM 07 PM
2 Likes