// Copyright 2007. Adobe Systems Incorporated. All Rights Reserved. package fl.events { import flash.events.Event; /** * The ColorPickerEvent class defines events that are associated with the ColorPicker component. * These include the following events: * * * @see fl.controls.ColorPicker ColorPicker * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public class ColorPickerEvent extends Event { /** * Defines the value of the type property for an itemRollOut * event object. * *

This event has the following properties:

* * * * * * * *
PropertyValue
bubblestrue
cancelabletrue
colorThe current color value of the ColorPicker component.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is * not always the object listening for the event. Use the currentTarget * property to access the object that is listening for the event.
* * @eventType itemRollOut * * @see #ITEM_ROLL_OVER * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const ITEM_ROLL_OUT:String = "itemRollOut"; /** * Defines the value of the type property for an itemRollOver * event object. * *

This event has the following properties:

* * * * * * * *
PropertyValue
bubblestrue
cancelabletrue
colorThe current color value of the ColorPicker component.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is * not always the object listening for the event. Use the currentTarget * property to access the object that is listening for the event.
* * @eventType itemRollOver * * @see #ITEM_ROLL_OUT * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const ITEM_ROLL_OVER:String = "itemRollOver"; /** * Defines the value of the type property of an enter * event object. * *

This event has the following properties:

* * * * * * * *
PropertyValue
bubblestrue
cancelabletrue
colorThe current color value of the ColorPicker component.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is * not always the object listening for the event. Use the currentTarget * property to access the object that is listening for the event.
* * @eventType enter * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const ENTER:String = "enter"; /** * Defines the value of the type property of the change * event object. * *

This event has the following properties:

* * * * * * * *
PropertyValue
bubblestrue
cancelabletrue
colorThe current color value of the ColorPicker component.
currentTargetThe object that is actively processing the event object with an event listener.
targetThe object that dispatched the event. The target is * not always the object listening for the event. Use the currentTarget * property to access the object that is listening for the event.
* * @includeExample ../controls/examples/ColorPicker.hexValue.1.as -noswf * * @eventType change * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public static const CHANGE:String = "change"; /** * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ protected var _color:uint; /** * Gets the color value that is associated with the event. * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public function get color():uint { return _color; } /** * Creates a new ColorPickerEvent object. * * @param type Indicates the current event type. * * @param color Indicates the color that is associated with the current event. * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ public function ColorPickerEvent(type:String, color:uint) { super(type, true); _color = color; } /** * Returns a string that contains all the properties of the ColorPickerEvent object. * * @return A string representation of the ColorPickerEvent object. * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ override public function toString():String { return formatToString("ColorPickerEvent", "type", "bubbles", "cancelable", "color"); } /** * Creates a copy of the ColorPickerEvent object and sets the value of each parameter to match * the original. * * @return A copy of the ColorPickerEvent instance. * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ override public function clone():Event { return new ColorPickerEvent(type, color); } } }