Join Login


Video Tutorials
Blog



Stock Photos from 123RF

ColorPicker Component


By: RiverCityGraphix      Views: 2737      Share: Bookmark and Share

In this tutorial, you will learn how to use the ColorPicker component in Flash CS4.

The ColorPicker Component can be very useful in giving a user control over design elements. You can allow them to change the color of any element. I have seen this component used in drawing applications to give control over brush color. I have also seen it used for overall site background color. This component is a great way to fit a lot of customization options into a small area. Enjoy and have fun changing colors.

ActionScript 3.0
import fl.events.ColorPickerEvent;

cpicker.selectedColor = 0xffffff;

var colorInfo:ColorTransform = circle.center.transform.colorTransform;

cpicker.addEventListener (ColorPickerEvent.CHANGE, colorchange);

function colorchange(event:ColorPickerEvent):void{
colorInfo.color = cpicker.selectedColor;
circle.center.transform.colorTransform = colorInfo;
}




Free Source Files Zip

99Designs.com