1. Home
  2. Computing & Technology
  3. Animation

Making Your Own Flash Slingshot Target Game: I

By Adrien-Luc Sanders, About.com

5 of 10

Now we need to go back and fix the animation so that it doesn’t play through all the way, and returns to just cycling through the bounces without ever reaching the “oh no! I’ve been hit, Cap’n!” stage. While those frames will be used at a later point, for right now we don’t want them to play unless the user does something to cause the animation to jump to their starting frame. The squishies need to keep bouncing constantly until we managed to thwack them with a rock.

Previously, any time we wanted to prevent animation from moving on to a frame, we just used a stop on the frame before it. This time that won’t work, though, because if it stops then the squishies will just freeze in place.

Instead I’ve used a gotoAndPlay command to create an endless loop. On the last frame of the bounce cycle, I’ve just added the command and told it to go to frame 1—so that when the movie clip plays through, every time it reaches that frame it zips right back to the first frame and starts again to repeat the bounce seamlessly. Now, when you play the animation, it should look exactly as it did before we added those extra bits.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Making Your Own Flash Slingshot Target Game: I

©2009 About.com, a part of The New York Times Company.

All rights reserved.