Developer Network Home  Help 

YDN Flash Developer Center Astra Flex Components ColorPlaneAndSliderPicker
Flash Developer Center

ASTRA ColorPlaneAndSliderPicker

ColorPlaneAndSliderPicker is a user interface component for Flex that allows the user to pick a color value. It combines a one-dimensional color slider with a two-dimensional color plane.

Getting Started: ColorPlaneAndSliderPicker for Flex 3

Similar to other Flex components, you can create a ColorPlaneAndSliderPicker by creating an instance with MXML or by using ActionScript to create an instance dynamically.

Initializing an ColorPlaneAndSliderPicker with MXML

Similar to other Flex components, you can create an ColorPlaneAndSliderPicker with MXML. First, you must import the yahoo namespace for the Astra Flex controls. Simply add xmlns:yahoo="http://www.yahoo.com/astra/2006/mxml" to your application or MXML component declaration.

To programmatically set the color of the ColorPlaneAndSliderPicker control, use the selectedColor property. It accepts a standard ActionScript uint color value.

Screen capture of ColorPlaneAndSliderPicker MXML Example

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the MXML example file.

Initializing an ColorPlaneAndSliderPicker with ActionScript

Alternatively, you can use ActionScript to instantiate an ColorPlaneAndSliderPicker control. Be sure the import the ColorPlaneAndSliderPicker class first, then simply create an instance and add it to the display list using addChild().

Like in MXML, you can set the selectedColor property using a uint value.

Screen capture of ColorPlaneAndSliderPicker ActionScript Example

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the MXML example file.

For additional topics, please read Using ColorPlaneAndSliderPicker, or take a look at the Examples section for functional demonstrations. The ActionScript 3.0 Class Reference contains full details on every property, method, and style available to the ColorPlaneAndSliderPicker component.