Unit 3 Lesson 12 Bubble 9b

In the following lesson:

the student was trying to ELLIPSE to create bubbles that would rise automatically. We couldn’t figure it out, so she created a bubble sprite in order to make it work.

What should she have done?

Thank you.

Gary Ellis

1 Like

She should’ve had a y variable for the bubble and made it go down every frame. After that, simply draw the bubble using ellipse.

@gellis1,

She could start by creating a variable such as yLoc = 400.

Then, when creating the ellipse, use yLoc as the y value for the ellipse.

Then, use the counter pattern (y=y-1) inside the draw loop and the ellipse would move like a sprite.

Hopefully this helps!

Mike