Wrap Multiple Objects


...and just like last time, we'll create the addEventListener statement to call our moveBall function:

If we test right now, we'll basically be using a lot of processing power to set the Y position of balls[0-4] at 50 pixels.... over and over and over!

Instead, let's move these things, one pixel at a time:

Test it now... all of the balls should move right down off the stage:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player