MovieClip | +--com.robertpenner.display.ColorTransformClip
The ColorTransformClip class extends the MovieClip class adding a collection of utilities that allows for more intuitive color manipulation.
ActionScript 2.0; Flash Player 8
Property summary
Property | Description |
---|---|
rgb:Number |
The rgb property of the ColorTransformClip. |
rgbStr:String |
The rgbStr property of the ColorTransformClip. |
brightness:Number |
The brightness property of the ColorTransformClip. |
brightOffset:Number |
The brightOffset property of the ColorTransformClip. |
negativeColor:Number |
The negativeColor property of the ColorTransformClip. |
red:Number |
The red property of the ColorTransformClip. |
green:Number |
The green property of the ColorTransformClip. |
blue:Number |
The blue property of the ColorTransformClip. |
redPercent:Number |
The redPercent property of the ColorTransformClip. |
greenPercent:Number |
The greenPercent property of the ColorTransformClip. |
bluePercent:Number |
The bluePercent property of the ColorTransformClip. |
redOffset:Number |
The redOffset property of the ColorTransformClip. |
greenOffset:Number |
The greenOffset property of the ColorTransformClip. |
blueOffset:Number |
The blueOffset property of the ColorTransformClip. |
alphaOffset:Number |
The alphaOffset property of the ColorTransformClip. |
redMultiplier:Number |
The redMultiplier property of the ColorTransformClip. |
greenMultiplier:Number |
The greenMultiplier property of the ColorTransformClip. |
blueMultiplier:Number |
The blueMultiplier property of the ColorTransformClip. |
alphaMultiplier:Number |
The alphaMultiplier property of the ColorTransformClip. |
Method summary
Method | Description |
---|---|
init() : Void |
Decorates all MovieClips with the methods of the XColorTransform class. |
mixin(obj:Object) : Void |
Decorates a particular MovieClip instance with the methods of the XColorTransform class. |
setRGB(col:Number) : Void |
Specifies an RGB color for a ColorTransformClip object. |
getRGB() : Number |
Returns the R+G+B combination currently in use by the ColorTransformClip object. |
setRGBStr(hexStr:String) : Void |
Specifies an RGB color for a ColorTransformClip object using a string hexadecimal value. |
getRGBStr() : String |
Returns the R+G+B combination currently in use by the ColorTransformClip object as a string hexadecimal value. |
setRGB2(r:Number, g:Number, b:Number) : Void |
Specifies an RGB color for a ColorTransformClip object using individual red, green, and blue values. |
getRGB2() : Object |
Returns the R+G+B values currently in use by the ColorTransformClip object as individual red, green, and blue values. |
resetColor() : Void |
Sets the color transform for a ColorTransformClip object to its default values. |
setBrightness(bright:Number) : Void |
Specifies the brightness of a ColorTransformClip object. |
getBrightness() : Number |
Returns the brightness of a ColorTransformClip object. |
setBrightOffset(offset:Number) : Void |
Pushes a ColorTransformClip object towards black or white by an absolute amount. |
getBrightOffset() : Number |
Returns the brightness offset value of a ColorTransformClip object. |
setTint(r:Number, g:Number, b:Number, percent:Number) : Void |
Tints a ColorTransformClip object with a color according to a certain percentage. |
getTint() : Object |
Returns the tint of a ColorTransformClip object. |
setTint2(rgb:Number, percent:Number) : Void |
Tints a ColorTransformClip object with a color according to a certain percentage. |
getTint2() : Object |
Returns the tint of a ColorTransformClip object. |
setTintOffset(r:Number, g:Number, b:Number) : Void |
Tints a ColorTransformClip object with a color according to red, green, and blue values. |
getTintOffset() : Object |
Returns the tint offset of a ColorTransformClip object. |
setTintOffset2(rgb:Number) : Void |
Tints a ColorTransformClip object with a color according to an rgb value. |
getTintOffset2() : Number |
Returns the tint offset of a ColorTransformClip object. |
invertColor() : Void |
Performs a straightforward color inversion. |
setNegativeColor(percent:Number) : Void |
Inverts a ColorTransformClip object by a certain percentage. |
getNegativeColor() : Number |
Returns the negative percentage of a ColorTransformClip object. |
setRed(amount:Number) : Void |
Specifies a red color value for a ColorTransformClip object. |
getRed() : Number |
Returns the red color value of a ColorTransformClip object. |
setGreen(amount:Number) : Void |
Specifies a green color value for a ColorTransformClip object. |
getGreen() : Number |
Returns the green color value of a ColorTransformClip object. |
setBlue(amount:Number) : Void |
Specifies a blue color value for a ColorTransformClip object. |
getBlue() : Number |
Returns the blue color value of a ColorTransformClip object. |
setRedPercent(percent:Number) : Void |
Specifies a red percentage value for a ColorTransformClip object. |
getRedPercent() : Number |
Returns the red percentage value of a ColorTransformClip object. |
setGreenPercent(percent:Number) : Void |
Specifies a green percentage value for a ColorTransformClip object. |
getGreenPercent() : Number |
Returns the green percentage value of a ColorTransformClip object. |
setBluePercent(percent:Number) : Void |
Specifies a blue percentage value for a ColorTransformClip object. |
getBluePercent() : Number |
Returns the blue percentage value of a ColorTransformClip object. |
setRedOffset(offset:Number) : Void |
Specifies a red offset value for a ColorTransformClip object. |
getRedOffset() : Number |
Returns the red offset value of a ColorTransformClip object. |
setGreenOffset(offset:Number) : Void |
Specifies a green offset value for a ColorTransformClip object. |
getGreenOffset() : Number |
Returns the green offset value of a ColorTransformClip object. |
setBlueOffset(offset:Number) : Void |
Specifies a blue offset value for a ColorTransformClip object. |
getBlueOffset() : Number |
Returns the blue offset value of a ColorTransformClip object. |
setAlphaOffset(offset:Number) : Void |
Specifies an alpha offset value for a ColorTransformClip object. |
getAlphaOffset() : Number |
Returns the alpha offset value of a ColorTransformClip object. |
setRedMultiplier(multiplier:Number) : Void |
Specifies a red multiplier value for a ColorTransformClip object. |
getRedMultiplier() : Number |
Returns the red multiplier value of a ColorTransformClip object. |
setGreenMultiplier(multiplier:Number) : Void |
Specifies a green multiplier value for a ColorTransformClip object. |
getGreenMultiplier() : Number |
Returns the green multiplier value of a ColorTransformClip object. |
setBlueMultiplier(multiplier:Number) : Void |
Specifies a blue multiplier value for a ColorTransformClip object. |
getBlueMultiplier() : Number |
Returns the blue multiplier value of a ColorTransformClip object. |
setAlphaMultiplier(multiplier:Number) : Void |
Specifies an alpha multiplier value for a ColorTransformClip object. |
getAlphaMultiplier() : Number |
Returns the alpha multiplier value of a ColorTransformClip object. |
colorToString() : String |
Formats and returns a string that describes all of the color properties of the ColorTransformClip object. |
com.robertpenner.display.ColorTransformClip.init();
Nothing.
Decorates all MovieClips with the methods of the XColorTransform class.
com.robertpenner.display.ColorTransformClip.mixin(my_mc);
obj:Object
- The object to mix in.
Nothing.
Decorates a particular MovieClip instance with the methods of the XColorTransform class.
my_mc.setRGB(0x0000FF);
col:Number
- The hexadecimal or RGB color to be set.
Nothing.
Specifies an RGB color for a ColorTransformClip object.
trace (my_mc.getRGB());
A number that represents the RGB numeric value for the color specified.
Returns the R+G+B combination currently in use by the ColorTransformClip object.
my_mc.setRGBStr("#FFFF00");
hexStr:String
- The string hexadecimal color to be set.
Nothing.
Specifies an RGB color for a ColorTransformClip object using a string hexadecimal value.
trace (my_mc.getRGBStr());
The string hexadecimal color.
Returns the R+G+B combination currently in use by the ColorTransformClip object as a string hexadecimal value.
my_mc.setRGB2(255, 0, 255);
r:Number
- The red color value.
g:Number
- The green color value.
b:Number
- The blue color value.
Nothing.
Specifies an RGB color for a ColorTransformClip object using individual red, green, and blue values.
var rgb:Object = my_mc.getRGB2();
trace (rgb.r);
trace (rgb.g);
trace (rgb.b);
The RBG value object with r, g, and b properties.
Returns the R+G+B values currently in use by the ColorTransformClip object as individual red, green, and blue values.
my_mc.rgb = 0x0000FF;
my_mc.resetColor();
Nothing.
Sets the color transform for a ColorTransformClip object to its default values.
my_mc.setBrightness(50);
bright:Number
- A percentage value between -100 and 100. Positive values brighten the color. and negative values darken it.
Nothing.
Specifies the brightness of a ColorTransformClip object.
my_mc.setBrightness(50);
trace (my_mc.getBrightness());
The brightness value.
Returns the brightness of a ColorTransformClip object.
my_mc.setBrightOffset(140);
offset:Number
- A number between -255 and 255. Positive values push colors towards white; negative values towards black.
Nothing.
Pushes a ColorTransformClip object towards black or white by an absolute amount.
my_mc.setBrightOffset(140);
trace (my_mc.getBrightOffset());
The brightness offset value.
Returns the brightness offset value of a ColorTransformClip object.
my_mc.setTint(0, 0, 128, 50);
r:Number
- The red color value.
g:Number
- The green color value.
b:Number
- The blue color value.
percent:Number
- The tint percentage.
Nothing.
Tints a ColorTransformClip object with a color according to a certain percentage.
my_mc.setTint(0, 0, 128, 50);
var tint:Object = my_mc.getTint();
trace (tint.r);
trace (tint.g);
trace (tint.b);
trace (tint.percent);
The tint value object with r, g, b, and percent properties.
Returns the tint of a ColorTransformClip object.
my_mc.setTint2(0x0000FF, 100);
rgb:Number
- The rgb value.
percent:Number
- The tint percentage.
Nothing.
Tints a ColorTransformClip object with a color according to a certain percentage.
my_mc.setTint2(0x0000FF, 100);
var tint:Object = my_mc.getTint2();
trace (tint.rgb);
trace (tint.percent);
The tint value object with rgb and percent properties.
Returns the tint of a ColorTransformClip object.
my_mc.setTintOffset(0, 0, 128);
r:Number
- The red color value.
g:Number
- The green color value.
b:Number
- The blue color value.
Nothing.
Tints a ColorTransformClip object with a color according to red, green, and blue values.
my_mc.setTintOffset(0, 0, 128);
var tint:Object = my_mc.getTintOffset();
trace (tint.r);
trace (tint.g);
trace (tint.b);
The tint offset value object with r, g, and b properties.
Returns the tint offset of a ColorTransformClip object.
my_mc.setTintOffset2(0x000080);
rgb:Number
- The rgb value.
Nothing.
Tints a ColorTransformClip object with a color according to an rgb value.
my_mc.setTintOffset2(0x000080);
trace (my_mc.getTintOffset2());
The tint offset value object with an rgb properties.
Returns the tint offset of a ColorTransformClip object.
my_mc.invertColor();
Nothing.
Performs a straightforward color inversion.
my_mc.setNegativeColor(60);
percent:Number
- The negative percentage.
Nothing.
Inverts a ColorTransformClip object by a certain percentage.
my_mc.setNegativeColor(60);
trace (my_mc.getNegativeColor());
The negative percentage.
Returns the negative percentage of a ColorTransformClip object.
my_mc.setRed(128);
amount:Number
- The red color value.
Nothing.
Specifies a red color value for a ColorTransformClip object.
my_mc.setRed(128);
trace (my_mc.getRed());
The red color value.
Returns the red color value of a ColorTransformClip object.
my_mc.setGreen(128);
amount:Number
- The green color value.
Nothing.
Specifies a green color value for a ColorTransformClip object.
my_mc.setGreen(128);
trace (my_mc.getGreen());
The green color value.
Returns the green color value of a ColorTransformClip object.
my_mc.setBlue(128);
amount:Number
- The blue color value.
Nothing.
Specifies a blue color value for a ColorTransformClip object.
my_mc.setBlue(128);
trace (my_mc.getBlue());
The blue color value.
Returns the blue color value of a ColorTransformClip object.
my_mc.setRedPercent(50);
percent:Number
- The red percentage value.
Nothing.
Specifies a red percentage value for a ColorTransformClip object.
my_mc.setRedPercent(50);
trace (my_mc.getRedPercent());
The red percentage value.
Returns the red percentage value of a ColorTransformClip object.
my_mc.setGreenPercent(50);
percent:Number
- The green percentage value.
Nothing.
Specifies a green percentage value for a ColorTransformClip object.
my_mc.setGreenPercent(50);
trace (my_mc.getGreenPercent());
The green percentage value.
Returns the green percentage value of a ColorTransformClip object.
my_mc.setBluePercent(50);
percent:Number
- The blue percentage value.
Nothing.
Specifies a blue percentage value for a ColorTransformClip object.
my_mc.setBluePercent(50);
trace (my_mc.getBluePercent());
The blue percentage value.
Returns the blue percentage value of a ColorTransformClip object.
my_mc.setRedOffset(-128);
offset:Number
- The red offset value.
Nothing.
Specifies a red offset value for a ColorTransformClip object.
my_mc.setRedOffset(-128);
trace (my_mc.getRedOffset());
The red offset value.
Returns the red offset value of a ColorTransformClip object.
my_mc.setGreenOffset(-128);
offset:Number
- The green offset value.
Nothing.
Specifies a green offset value for a ColorTransformClip object.
my_mc.setGreenOffset(-128);
trace (my_mc.getGreenOffset());
The green offset value.
Returns the green offset value of a ColorTransformClip object.
my_mc.setBlueOffset(-128);
offset:Number
- The blue offset value.
Nothing.
Specifies a blue offset value for a ColorTransformClip object.
my_mc.setBlueOffset(-128);
trace (my_mc.getBlueOffset());
The blue offset value.
Returns the blue offset value of a ColorTransformClip object.
my_mc.setAlphaOffset(-128);
offset:Number
- The alpha offset value.
Nothing.
Specifies an alpha offset value for a ColorTransformClip object.
my_mc.setAlphaOffset(-128);
trace (my_mc.getAlphaOffset());
The alpha offset value.
Returns the alpha offset value of a ColorTransformClip object.
my_mc.setRedMultiplier(.5);
multiplier:Number
- The red multiplier value.
Nothing.
Specifies a red multiplier value for a ColorTransformClip object.
my_mc.setRedMultiplier(.5);
trace (my_mc.getRedMultiplier());
The red multiplier value.
Returns the red multiplier value of a ColorTransformClip object.
my_mc.setGreenMultiplier(.5);
multiplier:Number
- The green multiplier value.
Nothing.
Specifies a green multiplier value for a ColorTransformClip object.
my_mc.setGreenMultiplier(.5);
trace (my_mc.getGreenMultiplier());
The green multiplier value.
Returns the green multiplier value of a ColorTransformClip object.
my_mc.setBlueMultiplier(.5);
multiplier:Number
- The blue multiplier value.
Nothing.
Specifies a blue multiplier value for a ColorTransformClip object.
my_mc.setBlueMultiplier(.5);
trace (my_mc.getBlueMultiplier());
The blue multiplier value.
Returns the blue multiplier value of a ColorTransformClip object.
my_mc.setAlphaMultiplier(.5);
multiplier:Number
- The alpha multiplier value.
Nothing.
Specifies an alpha multiplier value for a ColorTransformClip object.
my_mc.setAlphaMultiplier(.5);
trace (my_mc.getAlphaMultiplier());
The alpha multiplier value.
Returns the alpha multiplier value of a ColorTransformClip object.
trace(my_mc.colorToString());
A string that lists all of the color properties of the ColorTransformClip object.
Formats and returns a string that describes all of the color properties of the ColorTransformClip object.
trace (my_mc.rgb);
The rgb property of the ColorTransformClip.
trace (my_mc.rgbStr);
The rgbStr property of the ColorTransformClip.
trace (my_mc.brightness);
The brightness property of the ColorTransformClip.
trace (my_mc.brightOffset);
The brightOffset property of the ColorTransformClip.
trace (my_mc.negativeColor);
The negativeColor property of the ColorTransformClip.
trace (my_mc.red);
The red property of the ColorTransformClip.
trace (my_mc.green);
The green property of the ColorTransformClip.
trace (my_mc.blue);
The blue property of the ColorTransformClip.
trace (my_mc.redPercent);
The redPercent property of the ColorTransformClip.
trace (my_mc.greenPercent);
The greenPercent property of the ColorTransformClip.
trace (my_mc.bluePercent);
The bluePercent property of the ColorTransformClip.
trace (my_mc.redOffset);
The redOffset property of the ColorTransformClip.
trace (my_mc.greenOffset);
The greenOffset property of the ColorTransformClip.
trace (my_mc.blueOffset);
The blueOffset property of the ColorTransformClip.
trace (my_mc.alphaOffset);
The alphaOffset property of the ColorTransformClip.
trace (my_mc.redMultiplier);
The redMultiplier property of the ColorTransformClip.
trace (my_mc.greenMultiplier);
The greenMultiplier property of the ColorTransformClip.
trace (my_mc.blueMultiplier);
The blueMultiplier property of the ColorTransformClip.
trace (my_mc.alphaMultiplier);
The alphaMultiplier property of the ColorTransformClip.