Usage and Code Samples for Color Picker Pro V1 Flash Component



Color Picker Pro V1 Usage

1. Drag & Drop component to stage.
2. Name the component's instance in order to link it in your code.
3.From the parameters panel of the component set the preseted color, visible state and the type of the outline(verision) that you want to show: easy, pro, easypro(easy with pro button that allows to enlarge the color picker in runtime)
4. Using a listener, retreive onOk, onChange, onClose and onCopy events.
5. Use the .open(red,green,blue) and .close() in order to open the component(with preseted color) or to close it.

Example:
cp.open(255,0,0)
cp.close()


In order to use .open(r,g,b) function properly you need that the Color Picker Component to be completly initialized, so listen to the onLoad event too, call the .open(r,g,b) action after the onLoad is fired. The .open() function has priority over the default color (opened with default parameters) only if the visible state is turn off (false), else the default presetted color will load first.

Code Samples

listener = new Object();
cp.addListener(listener);
listener.onChange = function(message) {
hexacode=message;
color0xFormat="0x"+message.substr(1);
red=cp.red; // (0-255)
green=cp.green; // (0-255)
blue=cp.blue; // (0-255)
saturation=cp.saturation; // (0-100)
brightness = cp.brightnes; // (0-100)
hue = cp.hue; // (0-360)
hexacode =cp.hexa; // (#992288)
}

// The same code may be used for onCopy, onClose, onOk events too.
// You may also retreive color parameters anytime in your code without adding any listeners at all. You can use. for example, onEnterFrame event.

FlashEff 2.0
Create professional flash photo slideshows online

FREE Flash Stuff

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use)

Free Trial Versions

The trial versions do have a major limitation. They will ONLY run into debugger flash player versions, such as the Flash IDE player and the activeX FP used by developers.

Switch from Free Trial version to Full version.

You can switch from Trial to Full versions in a blink of an eye.
See this tutorial in order to find out how.

We accept Google Checkout

Google Checkout Acceptance Mark

Secured by VeriSign