pseudo.clrpick.ColorPicker class
View Sample :: Return to index  
pseudo.clrpick.ColorPicker.ColorPicker(pThis:MovieClip)
ColorPicker constructor. You never use the constructor to create this component.

Parameters pThis The movie clip on which the new ColorPicker will be drawn.
Returns Nothing
Example
    None


pseudo.clrpick.ColorPicker.create(pOwner:MovieClip, strName:String, nDepth:Number):pseudo.clrpick.ColorPicker
Use this static function to create new ColorPicker on the specified movie clip. Never use constructor directly to do it.

Parameters pOwner The movie clip on which the new ColorPicker will be drawn.
strName The new ColorPicker instance name.
nDepth The new ColorPicker instance depth.
Returns The reference to new ColorPicker instance
Example
  // Create an instance of the skin look
  var look:Object = pseudo.look.StdLook.getInstance();

  // layer for comboboxes lists and other object with the same behavior
  _global.popup = pseudo.BaseMovie.create(_root, "popup", 2);

  //Create an instance of the color picker component
  picker = pseudo.clrpick.ColorPicker.create(_root, "picker", 1);

  //apply the slin to the ColorPicker instance
  picker.setLook(look);
  picker.setSize(20, 20);
  picker.addListener("changed", this, onChanged);
  picker._x = 10;
  picker._y = 10;
  picker.setColor(0xff0000);
  picker.update();
  picker.draw();


  function onChanged(clrOld:Number, clrNew:Number):Void
  {
  }


pseudo.clrpick.ColorPicker.setColor(clr:Number):Void
Sets the current value of the ColorPicker component
Parameters clr Number The color to set as the current value of the ColorPicker component
Returns Nothing
Example
    
  picker.setColor(0xff0000);// set the current value of the color picker to red 

pseudo.clrpick.ColorPicker. getColor():Number
Returns the current color selected in the ColorPicker.

Parameters None
Returns Number value
Example
  picker.getColor();

 

Flash UI Components (c)TUFaT.com, All Rights Reserved.