Packagevegas.colors
Classpublic class TintColor
InheritanceTintColor Inheritance Color Inheritance Object

Controls the tint of a Color object.



Public Properties
 PropertyDefined By
 InheritedcolorTransform : ColorTransform
A ColorTransform object containing values that universally adjust the colors in the display object.
Color
 Inheriteddisplay : DisplayObject
[read-only] The DisplayObject reference of this object.
Color
 Inheritedrgb : *
Indicates the R+G+B combination currently in use by the color object.
Color
Public Methods
 MethodDefined By
  
TintColor(display:DisplayObject)
Creates a new TintColor instance.
TintColor
 Inherited
getRGB():Number
Returns the R+G+B combination currently in use by the color object
Color
  
getTint():Object
Returns the tint of a Color object.
TintColor
  
getTint2():Object
Returns the tint of a Color object.
TintColor
  
getTintOffset():Object
Returns the tint offset of a Color object.
TintColor
 Inherited
getTransform():Object
Returns the transform value set by the last setTransform() call.
Color
 Inherited
invert():void
Inverts the color of the specified Color reference in argument.
Color
 Inherited
reset():void
Resets the color of the specified Color reference in argument, the MovieClip display the original view since Color transformation.
Color
 Inherited
setRGB(hex:*):void
Specifies an RGB color for a Color object.
Color
  
setTint(r:Number, g:Number, b:Number, percent:Number):void
Tints a color object with a Color according to a certain percentage.
TintColor
  
setTint2(hex:Number, percent:Number):void
Tints a color object with a Color according to a certain percentage.
TintColor
  
setTintOffset(r:Number, g:Number, b:Number):void
Tints a Color object with a color according to red, green, and blue values.
TintColor
 Inherited
setTransform(transformObject:Object):void
Sets color transform information for a Color object.
Color
 Inherited
toRGBString():String
Returns the string representation of the passed color with ECMAScript formatting (0xrrggbb).
Color
Public Constants
 ConstantDefined By
 InheritedEVALUATOR : ColorEvaluator
[static] The color evaluator singleton reference.
Color
Constructor Detail
TintColor()Constructor
public function TintColor(display:DisplayObject)

Creates a new TintColor instance.

Parameters
display:DisplayObject — a DisplayObject reference.
Method Detail
getTint()method
public function getTint():Object

Returns the tint of a Color object.

Example

         var color:TintColor = new TintColor(my_mc);
         color.setTint( 0, 0, 128, 50 ) ;
         var tint:Object = color.getTint();
         trace ("r : " + tint.r);
         trace ("g : " + tint.g);
         trace ("b : " + tint.b);
         trace ("percent : " + tint.percent);
         

Returns
Object — The tint value object with r, g, b, and percent properties.
getTint2()method 
public function getTint2():Object

Returns the tint of a Color object.

Example

         var cTint:TintColor = new TintColor(my_mc);
         cTint.setTint2( 0x0000FF, 100 ) ;
         var tint:Object = cTint.getTint2();
         trace ("rgb     : " + tint.rgb);
         trace ("percent : " + tint.percent);
         

Returns
Object — The tint value object with rgb and percent properties.
getTintOffset()method 
public function getTintOffset():Object

Returns the tint offset of a Color object.

Example

         var color:TintColor = new TintColor(my_mc);
         color.setTintOffset(0, 0, 128);
         var tint:Object = color.getTintOffset();
         trace ("r : " + tint.r);
         trace ("g : " + tint.g);
         trace ("b : " + tint.b);
         

Returns
Object — The tint offset value object with r, g, and b properties.
setTint()method 
public function setTint(r:Number, g:Number, b:Number, percent:Number):void

Tints a color object with a Color according to a certain percentage.

Example

         var color:TintColor = new TintColor(my_mc);
         color.setTint( 0, 0, 128, 50 ) ;
         

Parameters

r:Number — The red color value.
 
g:Number — The green color value.
 
b:Number — The blue color value.
 
percent:Number

setTint2()method 
public function setTint2(hex:Number, percent:Number):void

Tints a color object with a Color according to a certain percentage.

Example

         var color:TintColor = new TintColor(my_mc);
         color.setTint2( 0x0000FF, 100 ) ;
         

Parameters

hex:Number — The rgb value.
 
percent:Number — The tint percentage.

setTintOffset()method 
public function setTintOffset(r:Number, g:Number, b:Number):void

Tints a Color object with a color according to red, green, and blue values.

Example

         var color:TintColor = new TintColor(my_mc);
         color.setTintOffset( 0, 0, 128 ) ;
         

Parameters

r:Number — The red color value.
 
g:Number — The green color value.
 
b:Number — The blue color value.