Animation

  1. Home
  2. Computing & Technology
  3. Animation

Using setTransform to Change Color and Opacity

By Adrien-Luc Sanders, About.com

4 of 7

In the Actions Panel, we’re going to define a variable named select whose value (true or false) will determine whether the button is highlighted or not. We’ll use an onClipEvent to set a starting value of the variable when the clip loads:
onClipEvent (load) {
var select=false;
}

We’re starting off with the variable set to false – so the button isn’t highlighted. We could set it to true if we wanted; it doesn’t matter, as long as the value changes when the button’s clicked. And speaking of that…

4 of 7

Index: Using setTransform to Change Color and Opacity

  1. Part 1
  2. Part 2
  3. Part 3
  4. Part 4
  5. Part 5
  6. Part 6
  7. Part 7

Explore Animation

More from About.com

Animation

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Using setTransform to Change Color and Opacity

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

All rights reserved.