1. Home
  2. Computing & Technology
  3. Animation

Deconstructing the Paint Application XI: Gradient Tool Options

By , About.com Guide

5 of 5

The last thing you need to do is set up a controller movie clip that, each time it cycles through its single frame, will check the value of your gradient variables and manipulate them to add the proper strings to them - and then use setRGB and _alpha to change the color and opacity of each gradient swatch to reflect:
onClipEvent(enterFrame) {
testcolor1="0x"+_root.base.gc1;
testcolor2="0x"+_root.base.gc2;
//make the color boxes display each individual gradient color
gradcol1=new Color(_root.base.gdcolor1);
gradcol1.setRGB(testcolor1);
_root.base.gdcolor1._alpha=_root.base.ga1;
gradcol2=new Color(_root.base.gdcolor2);
gradcol2.setRGB(testcolor2);
_root.base.gdcolor2._alpha=_root.base.ga2;
}
Explore Animation
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, 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. Deconstructing the Paint Application XI: Gradient Tool Options

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

All rights reserved.