The Flashvalleycolor picker lets you select a color at runtime and apply it to any element on the stage very easily. The selected color is sent as a color value parameter to a function that you define yourself in the parameter window. The color picker can be dragged and dropped anywhere on the stage at runtime.
The Color picker can be dragged by clicking on any of the light green areas represented in the picture on the left
Using the Color Picker
The Flashvalley color picker is very easy to use :
1. Drag the component on to the stage
2. On the same level where the color picker sits (the _root if the color picker sits on the root for example), define a function that you want to call when a color is selected. Enter the name of the function you just defined in the parameter window (setColor for our example here) (fig1)
fig1
The color value is passed to the function as a hexadecimal value (0xFF5678 for example), these value are easy to use as parameters with methods like setRGB for example. In the demo at the bottom of the page we use the following code to send the color value to the text field :
function setColor(myColor){
myTextField.text = myColor;
}
Example (click on the little green square to open the color picker)
You need to have a full version or working demo of Flash
in order to use Flash components.