Wrap Multiple Objects

The moveBall function

Just like last time, we'll name the function moveBall:

Notice that little shortcut in the moveBall function arguments. The first time we created on of these functions, we typed (event:Event). Now, we're taking a common ActionScript programming shortcut and abbreviating to (e:Event)

Let's clean up our code with tabs:

If you test it now, none of the balls should be at y=50. Why? Because we haven't called the moveBall function yet.