Creating a Loop
Find and Replace
OK, so let's cut that out right now... go back to adding a single instance of ball on the stage:
We can't have every instance of ball named ball1, right? What we need to do is replace that very specific name with something just slightly more general: myBall. You could go through and replace each instance of ball1 by hand, or you could use the Find and Replace shortcut: CTRL+F
- In the Find what box type ball1
- In the Replace with box type myBall
- Click Replace All
Flash returns a message saying it replaced 4 items:
And your ActionScript window now looks like this:
Hey, let's test to make certain our project still functions: