1. Home
  2. Computing & Technology
  3. Animation

Making Your Own Flash Slingshot Target Game: II

By , About.com Guide

6 of 6

Now we need to make a few edits, and for these edits we’re going to need to switch to Expert Mode. While we can change the frame number that the command jumps the movie to in Normal Mode, we need to add a little something extra to point the command in the right direction. In Expert Mode, change the frame number inside the ( ) from 1 to 2. If you remember in the last lesson where we set up this animation, the first frame had a stop on it to prevent the full firing animation from playing; if we tell it to go to frame 2 and play, then the full animation will play before cycling back to the beginning position and stopping until we click again.

Then, before the gotoAndPlay command, add this separated by a period ( . ). Your command should now look like this:

this.gotoAndPlay(2) ;

this is the most common way to tell Flash that the command needs to act on the object that you’re currently working on, and is actually accepted as an identifier. Any time that you’re scripting for a certain object, you can actually use this in place of the instance name. The instance name only becomes necessary when you’re scripting an object to act on a different object.

Try firing the slingshot.

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

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

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

All rights reserved.