Using ActionScript 3.0 Components |
|
|
|
| Using the UI Components > Using the ColorPicker > User interaction with the ColorPicker | |||
A ColorPicker allows a user to select a color and apply it to another object in the application. For example, if you want to allow the user to personalize elements of the application, such as a background color or the color of text, you can include a ColorPicker and apply the color that the user selects.
A user chooses a color by clicking its swatch in the panel or by entering its hexadecimal value in the text field. Once the user selects a color, you can use the ColorPicker's selectedColor property to apply the color to text or another object in the application.
A ColorPicker instance receives focus if a user moves the pointer over it or tabs to it. When a ColorPicker's swatch panel is open, you can use the following keys to control it:
|
Key |
Description |
|---|---|
|
Home |
Moves the selection to the first color in the swatch panel. |
|
Up Arrow |
Moves the selection up one row in the swatch panel. |
|
Down Arrow |
Moves the selection down one row in the swatch panel. |
|
Right Arrow |
Moves the selection in the swatch panel one color to the right. |
|
Left Arrow |
Moves the selection in the swatch panel one color to the left. |
|
End |
Moves the selection to the last color in the swatch panel. |
|
|
|
|