1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 18: Controlling Movie Clips With Buttons and ActionScripting II

By , About.com Guide

1 of 4

Adding a New Element

In our last lesson, we set up buttons to allow end-users to add different elements to our snowman animation in whatever order they chose by setting each button to reference a certain movie clip to tell it to play. However, once that element was added to the scene, it was stuck there; clicking the button only causes the entering animation to play again, rather than removing it. If we leave our animation as-is, then any time the user wants to remove an element (say they decide they don't want their snowman to have a scarf), they have to go all the way back to the first options screen selecting between a tall or short snowman and start over again from scratch.

That's a mite inconvenient, and not really any fun. So what we need is an option to remove each element separately without affecting the rest of the scene. To do that, we're going to set up a new group of button options.

To start with, just use the text tool to put a new header in a clear area of your stage titled "Remove" (or whatever suits you), and then drag and drop new instances of the buttons you should already have created to arrange them under the heading.

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. Flash Animation 18: Controlling Movie Clips With Buttons and ActionScripting II

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

All rights reserved.