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…

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. Using setTransform to Change Color and Opacity

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

All rights reserved.