1. Home
  2. Computing & Technology
  3. Animation

Flash Halloween Costume Dress-Up Doll II: Controls & Scripting

By , About.com Guide

6 of 10

Have you finished adding the script to all of your individual menu parts? All right, then let’s move on.

This part’s strictly optional, but it may make the game a bit more user-friendly. We’re going to do something similar to the previous step, only this time we’re going to apply it to the actual costume pieces so that once they’ve been made visible on the doll, the user can click on the pieces themselves instead of the menu options to hide them again.

on (release) {
this._visible=!this._visible;
}

Because this script points to the currently active clip using this instead of referencing an instance name, you can copy it and paste it without alteration for each individual costume part. You could also, if you'd like, copy it into an external file and reference it with an #include for each symbol.

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 Halloween Costume Dress-Up Doll II: Controls & Scripting

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

All rights reserved.