Animate Your Name
Bounce the name

Whew! Great work with if/else statements!

Let's make the bubbles in your name more interactive. It would be cool if you could mouse over your name and cause it to move in some way. We have a function called bounceName() that shakes your name around when a mouse comes close to it. Note that bounceName() does not take any inputs, unlike drawName() which took two inputs.

  1. Add the function bounceName() as the last line of your program after the drawName() function. Remember that bounceName() is a function that does not take any inputs.
  2. Click Save & Submit Code, and then move your mouse around on your name.
View Preview