My account
Shopping cart
Knowledge base
Support


Color Picker Pro V3 Events



Overview | Properties | Methods | Events | Styles | XML

Usage1:


myEventListener = new Object();
myEventListener.onLoad = function(){
}
componentInstance.addEventListener("onLoad",myEventListener);


Usage2:


on the component's handler on (onLoad) {
}


 
Event Description
buttonClicked Broadcasted only when autoMode property is set to false, when the user clicked the button clip.

EventObject parameters:
target:MovieClip - the color picker that sent the event

Usage:
myEventListener = new Object();
myEventListener.buttonClicked = function(args) {
    trace("buttonClicked "+ args.target);
}
componentInstance.addEventListener("buttonClicked ", myEventListener);
closeEasy Broadcasted only when autoMode property is set to false, the easy clip should normally close due to user interaction.

EventObject parameters:
target:MovieClip - the color picker that sent the event
source:String - the reason why the easy clip should close (the user clicked on one of the easy clip's components or selected a color) - possible values: "closeButton", "colorPalette", "external" (the user clicked outside the easy clip - either for color picking or for closing the easy clip), "background", "switchModeButton", "keyPressESCAPE" and "keyPressENTER"

Usage:
myEventListener = new Object();
myEventListener.easyClose = function(args) {
    trace("easyClose "+ args.target + ":" + args.source);
}
componentInstance.addEventListener("easyClose ", myEventListener);
closePro Broadcasted only when autoMode property is set to false, the pro clip should normally close due to user interaction.

EventObject parameters:
target:MovieClip - the color picker that sent the event
source:String - the reason why the pro clip should close (the user clicked on one of the easy clip's components or selected a color) - possible values: "switchModeButton", "okButton", "cancelButton", "keyPressESCAPE" and "keyPressENTER"

Usage:
myEventListener = new Object();
myEventListener.proClose = function(args) {
    trace("proClose "+ args.target + ":" + args.source);
}
componentInstance.addEventListener("proClose ", myEventListener);
onClose Event triggered when a Color Picker Pro V3 instance is closed.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
wasColorSelected:Boolean - "true" if the color picker was closed when a new color was selected, "false" otherwise
mode:String - the current mode/state of the color picker
isSwitching:Boolean - "true" if the easy or pro clip was closed because the user switched to another mode, "false" otherwise

Usage:
myEventListener = new Object();
myEventListener.onClose = function(args) {
    trace("onClose "+ args.target + ":" + args.wasColorSelected + ":" + args.mode + ":" + args.isSwitching);
}
componentInstance.addEventListener("onClose", myEventListener);
onColorChanged Event triggered when a new color is changed inside the Color Picker Pro V3 color holder.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
previousColor:Number - the last color before this selection
newColor:Number - the new color

Usage:
myEventListener = new Object();
myEventListener.onColorChanged = function(args) {
    trace("onColorChanged "+ args.target + ":" + args.previousColor + ":" + args.newColor);
}
componentInstance.addEventListener("onColorChanged ", myEventListener);
onColorSelected Event triggered when a new color is selected inside a Color Picker Pro V3 instance.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
previousColor:Number - the last color before this selection
newColor:Number - the new color
mode:String - the current mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onColorSelected = function(args) {
    trace("onColorSelected "+ args.target + ":" + args.previousColor + ":" + args.newColor + ":" + args.mode);
}
componentInstance.addEventListener("onColorSelected ", myEventListener);
onMouseColorPick Event triggered when the Mouse is start picking or stop picking colors either from an mc target, either from the color picker palette.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
colorPicking:Boolean - true if the component starts picking colors from a color source, false if it stops picking;
colorPalette:Boolean - true if the component is picking up colors from the component's own color palette
mode:String - the current mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onMouseColorPick = function(args) {
    trace("onMouseColorPick "+ args.target + ":" + args.colorPicking + ":" + args.colorPalette);
}
componentInstance.addEventListener("onMouseColorPick ", myEventListener);
onOpen Event is triggered when Color Picker Pro V3 opens a new instance.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
currentColor:Number - the last color
mode:String - the current mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onOpen = function(args) {
    trace("onOpen "+ args.target + ":" + args.currentColor + ":" + args.mode);
}
componentInstance.addEventListener("onOpen", myEventListener);
onStartDrag Event triggered when a user starts dragging a floating Color Picker Pro V3 instance.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
mode:String - the current mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onStartDrag = function(args) {
    trace("onStartDrag "+ args.target + ":" + args.mode);
}
componentInstance.addEventListener("onStartDrag ", myEventListener);
onStopDrag Event triggered when a user stops dragging a floating Color Picker Pro V3 instance.

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
mode:String - the current mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onStopDrag = function(args) {
    trace("onStopDrag "+ args.target + ":" + args.mode);
}
componentInstance.addEventListener("onStopDrag ", myEventListener);
onSwitch Event broadcasted when the user clicked the switch button (switch from easy to pro or from pro to easy).

EventObject parameters:
target:MovieClip - the Color Picker Pro V3 instance that sent the event
oldMode:String - the old mode/state of the color picker
newMode:String - the new mode/state of the color picker

Usage:
myEventListener = new Object();
myEventListener.onSwitch = function(args) {
    trace("onSwitch "+ args.target + ":" + args.oldMode + ":" + args.newMode);
}
componentInstance.addEventListener("onSwitch ", myEventListener);

Overview | Properties | Methods | Events | Styles | XML