Tweener Documentation

This class creates special properties used to control the properties of filters that are applied to certain display classes, such as `MovieClip`

or `DisplayObject`

. Filters have normal numerical properties, which are tweenable, but because a change in a filter instance isn't replicated to the object - the filter must be re-applied to it - these properties work as a kind of a proxy, simply setting the new value then applying the filter to the object again.

First, import then initialize the class.

import caurina.transitions.properties.FilterShortcuts; FilterShortcuts.init();

Then, you can use any of the special properties listed below on a normal tweening. See the introduction to special properties for more information.

Also notice that there are certain specific rules to using the filter properties:

- These special properties won't reset or otherwise remove existing filters of an object;
- If you try adding a filter tweening to an object that doesn't have a filter of that kind, Tweener will create a new filter using his own default values (as close as possible as the original object appearance) and then tween the filter properties to the new values;
- If you try adding a filter tweening to an object that already has a filter of that kind, it will tween the existing filter;
- If you have two filters of the same kind on an object, the tweening will refer to the first filter found.
- Certain properties of filters aren't tweenable because they are Strings or Boolean types. Other types are numeric, but shouldn't normally be tweened (like
`quality`

). Still, they're available as special properties because you can use the special property to define how a new filter should be created, in case a filter of that type isn't already featured on the object.

Also, please notice that filter tweening support as special properties is basically a *patch*; a way to tween variables that should properly support tweening in the first place, but they don't. In the future, it's possible these special properties won't even be necessary, depending on changes made to the ActionScript language or Tweener itself. So while these special property "proxies" will work, they represent an amend that hopefully won't be needed anymore someday.

These properties are all applied to the usual display objects: `MovieClip`

and `TextField`

on AS2, and `DisplayObject`

on AS3. They're also directly related to the original filter properties, so check the original reference where appropriate.

None of these properties are available on the legacy (Flash 7, Flash Lite 2 and Flash Lite 3) version of Tweener, as the platform doesn't support filters or bitmap manipulation of any kind.

Property name (AS2/AS3) | Description | Type | Usual values | Related reference |
---|---|---|---|---|

General properties | ||||

_filter | A new filter instance (of any type) that will be added to the object, or tweened to its new properties, if a filter of that type is already available on the object. | BitmapFilter | Any BitmapFilter (or subclass) instance. | BitmapFilter |

BevelFilter properties (Reference) | ||||

_Bevel_angle | The angle of the effect, in degrees. | Number | A number from 0 to 360. | BevelFilter.angle |

_Bevel_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | BevelFilter.blurX |

_Bevel_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | BevelFilter.blurY |

_Bevel_distance | The offset distance of the effect, in pixels. | Number | Any number. | BevelFilter.distance |

_Bevel_highlightAlpha | The alpha transparency value of the highlight color. | Number | A number from 0 to 1. | BevelFilter.highlightAlpha |

_Bevel_highlightColor | The highlight color of the bevel. | Number | Any color formatted as a number (for example, 0xffgg33). | BevelFilter.highlightColor |

_Bevel_highlightColor_r | Value of the red component of the highlight color. | Number | A number from 0 to 255. | |

_Bevel_highlightColor_g | Value of the green component of the highlight color. | Number | A number from 0 to 255. | |

_Bevel_highlightColor_b | Value of the blue component of the highlight color. | Number | A number from 0 to 255. | |

_Bevel_knockout | If true, applies a knockout effect, which effectively makes the object's fill transparent and reveals the background color of the document. | Boolean | `true` or `false` . |
BevelFilter.knockOut |

_Bevel_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | BevelFilter.quality |

_Bevel_shadowAlpha | The alpha transparency value of the shadow color. | Number | A number from 0 to 1. | BevelFilter.shadowAlpha |

_Bevel_shadowColor | The shadow color of the bevel. | Number | Any color formatted as a number (for example, 0xffgg33). | BevelFilter.shadowColor |

_Bevel_shadowColor_r | Value of the red component of the shadow color. | Number | A number from 0 to 255. | |

_Bevel_shadowColor_g | Value of the green component of the shadow color. | Number | A number from 0 to 255. | |

_Bevel_shadowColor_b | Value of the blue component of the shadow color. | Number | A number from 0 to 255. | |

_Bevel_strength | The strength of the imprint or spread. | Number | A number from 0 to 255. | BevelFilter.strength |

_Bevel_type | The placement of the filter effect on the object. | String | "inner", "outer", "full" | BevelFilter.type |

BlurFilter properties (Reference) | ||||

_Blur_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | BlurFilter.blurX |

_Blur_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | BlurFilter.blurY |

_Blur_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | BlurFilter.quality |

ColorMatrixFilter properties (Reference) | ||||

_ColorMatrix_matrix | An array of 20 items for 4 x 5 color transform. | Array | An array with 20 values. | ColorMatrixFilter.matrix |

_ColorMatrix_matrix_rr | The amount of influence the new red channel takes from the original red channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_rg | The amount of influence the new red channel takes from the original green channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_rb | The amount of influence the new red channel takes from the original blue channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ra | The amount of influence the new red channel takes from the original alpha channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ro | The additional offset added to the new red channel. | Number | A number from 0 to 255. | |

_ColorMatrix_matrix_gr | The amount of influence the new green channel takes from the original red channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_gg | The amount of influence the new green channel takes from the original green channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_gb | The amount of influence the new green channel takes from the original blue channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ga | The amount of influence the new green channel takes from the original alpha channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_go | The additional offset added to the new green channel. | Number | A number from 0 to 255. | |

_ColorMatrix_matrix_br | The amount of influence the new blue channel takes from the original red channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_bg | The amount of influence the new blue channel takes from the original green channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_bb | The amount of influence the new blue channel takes from the original blue channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ba | The amount of influence the new blue channel takes from the original alpha channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_bo | The additional offset added to the new blue channel. | Number | A number from 0 to 255. | |

_ColorMatrix_matrix_ar | The amount of influence the new alpha channel takes from the original red channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ag | The amount of influence the new alpha channel takes from the original green channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ab | The amount of influence the new alpha channel takes from the original blue channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_aa | The amount of influence the new alpha channel takes from the original alpha channel. | Number | A number from 0 to 1. | |

_ColorMatrix_matrix_ao | The additional offset added to the new alpha channel. | Number | A number from 0 to 255. | |

ConvolutionFilter properties (Reference) | ||||

_Convolution_alpha | The alpha transparency value of the substitute color. | Number | A number from 0 (fully transparent) to 1 (fully opaque). | ConvolutionFilter.alpha |

_Convolution_bias | The amount of bias to add to the result of the matrix transformation. | Number | A number from 0 to 255. | ConvolutionFilter.bias |

_Convolution_clamp | Indicates whether the image should be clamped. | Boolean | `true` or `false` . |
ConvolutionFilter.clamp |

_Convolution_color | The hexadecimal color to substitute for pixels that are off the source image. | Number | Any color formatted as a number (for example, 0xffgg33). | ConvolutionFilter.color |

_Convolution_color_r | Value of the red component of the displacement color. | Number | A number from 0 to 255. | |

_Convolution_color_g | Value of the green component of the displacement color. | Number | A number from 0 to 255. | |

_Convolution_color_b | Value of the blue component of the displacement color. | Number | A number from 0 to 255. | |

_Convolution_matrix | This is a complex property - based on an array - and is not supported. It's listed here as a reference, and because it will probably be supported in the future. | |||

_Convolution_matrixX | The x dimension of the matrix (the number of columns in the matrix). | Number | Any integer. | ConvolutionFilter.matrixX |

_Convolution_matrixY | The y dimension of the matrix (the number of columns in the matrix). | Number | Any integer. | ConvolutionFilter.matrixY |

_Convolution_preserveAlpha | Whether the alpha channel is preserved without the filter effect or if the convolution filter is applied to the alpha channel as well as the color channels. | Boolean | `true` or `false` . |
ConvolutionFilter.preserveAlpha |

DisplacementMapFilter properties (Reference) | ||||

_DisplacementMap_alpha | The alpha transparency value to use for out-of-bounds displacements. | Number | A number from 0 (fully transparent) to 1 (fully opaque). | DisplacementMapFilter.alpha |

_DisplacementMap_color | Specifies what color to use for out-of-bounds displacements. | Number | Any color formatted as a number (for example, 0xffgg33). | DisplacementMapFilter.color |

_DisplacementMap_color_r | Value of the red component of the displacement color. | Number | A number from 0 to 255. | |

_DisplacementMap_color_g | Value of the green component of the displacement color. | Number | A number from 0 to 255. | |

_DisplacementMap_color_b | Value of the blue component of the displacement color. | Number | A number from 0 to 255. | |

_DisplacementMap_componentX | Which color channel to use in the map image to displace the x result. | Number | 0, 1, 2, or 3. | DisplacementMapFilter.componentX |

_DisplacementMap_componentY | Which color channel to use in the map image to displace the y result. | Number | 0, 1, 2, or 3. | DisplacementMapFilter.componentY |

_DisplacementMap_mapBitmap | A BitmapData object containing the displacement map data. | BitmapData | Any BitmapData instance. | DisplacementMapFilter.mapBitmap |

_DisplacementMap_mapPoint | A value that contains the offset of the upper-left corner of the target display object from the upper-left corner of the map image. | Point | Any point. | DisplacementMapFilter.mapPoint |

_DisplacementMap_mapPoint_x | Value of the X position of the displacement map corner point. | Number | An integer number. | |

_DisplacementMap_mapPoint_y | Value of the Y position of the displacement map corner point. | Number | An integer number. | |

_DisplacementMap_mode | The mode for the filter. | String | "wrap", "clamp", "ignore", "color" | DisplacementMapFilter.mode |

_DisplacementMap_scaleX | The multiplier to use to scale the x displacement result from the map calculation. | Number | Any number. | DisplacementMapFilter.scaleX |

_DisplacementMap_scaleY | The multiplier to use to scale the y displacement result from the map calculation. | Number | Any number. | DisplacementMapFilter.scaleY |

DropShadowFilter properties (Reference) | ||||

_DropShadow_alpha | The alpha transparency value for the shadow color. | Number | A number from 0 (fully transparent) to 1 (fully opaque). | DropShadowFilter.alpha |

_DropShadow_angle | The angle of the effect, in degrees. | Number | A number from 0 to 360. | DropShadowFilter.angle |

_DropShadow_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | DropShadowFilter.blurX |

_DropShadow_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | DropShadowFilter.blurY |

_DropShadow_color | The color of the shadow. | Number | Any color formatted as a number (for example, 0xffgg33). | DropShadowFilter.color |

_DropShadow_color_r | Value of the red component of the shadow color. | Number | A number from 0 to 255. | |

_DropShadow_color_g | Value of the green component of the shadow color. | Number | A number from 0 to 255. | |

_DropShadow_color_b | Value of the blue component of the shadow color. | Number | A number from 0 to 255. | |

_DropShadow_distance | The offset distance of the effect, in pixels. | Number | Any number. | DropShadowFilter.distance |

_DropShadow_hideObject | Whether or not the object is hidden. | Boolean | `true` or `false` . |
DropShadowFilter.hideObject |

_DropShadow_inner | Whether or not the shadow is an inner shadow. | Boolean | `true` or `false` . |
DropShadowFilter.inner |

_DropShadow_knockout | If true, applies a knockout effect, which effectively makes the object's fill transparent and reveals the background color of the document. | Boolean | `true` or `false` . |
DropShadowFilter.knockout |

_DropShadow_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | DropShadowFilter.quality |

_DropShadow_strength | The strength of the imprint or spread. | Number | A number from 0 to 255. | DropShadowFilter.strength |

GlowFilter properties (Reference) | ||||

_Glow_alpha | The alpha transparency value for the color. | Number | A number from 0 (fully transparent) to 1 (fully opaque). | GlowFilter.alpha |

_Glow_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | GlowFilter.blurX |

_Glow_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | GlowFilter.blurY |

_Glow_color | The color of the glow. | Number | Any color formatted as a number (for example, 0xffgg33). | GlowFilter.color |

_Glow_color_r | Value of the red component of the glow color. | Number | A number from 0 to 255. | |

_Glow_color_g | Value of the green component of the glow color. | Number | A number from 0 to 255. | |

_Glow_color_b | Value of the blue component of the glow color. | Number | A number from 0 to 255. | |

_Glow_inner | Whether the glow is an inner glow. | Boolean | `true` or `false` . |
GlowFilter.inner |

_Glow_knockout | If true, applies a knockout effect, which effectively makes the object's fill transparent and reveals the background color of the document. | Boolean | `true` or `false` . |
GlowFilter.knockout |

_Glow_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | GlowFilter.quality |

_Glow_strength | The strength of the imprint or spread. | Number | A number from 0 to 255. | GlowFilter.strength |

GradientBevelFilter properties (Reference) | ||||

_GradientBevel_alphas | This is a complex property - based on an array - and is not supported. It's listed here as a reference, and because it will probably be supported in the future. | |||

_GradientBevel_angle | The angle of the effect, in degrees. | Number | A number from 0 to 360. | GradientBevel.angle |

_GradientBevel_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | GradientBevel.blurX |

_GradientBevel_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | GradientBevel.blurY |

_GradientBevel_colors | This is a complex property - based on an array - and is not supported. It's listed here as a reference, and because it will probably be supported in the future. | |||

_GradientBevel_distance | The offset distance of the effect, in pixels. | Number | Any number. | GradientBevel.distance |

_GradientBevel_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | GradientBevel.quality |

_GradientBevel_ratios | ||||

_GradientBevel_strength | The strength of the imprint or spread. | Number | A number from 0 to 255. | GradientBevel.strength |

_GradientBevel_type | The placement of the filter effect on the object. | String | "inner", "outer", "full" | GradientBevel.type |

GradientGlowFilter properties (Reference) | ||||

_GradientBevel_alphas | ||||

_GradientGlow_angle | The angle of the effect, in degrees. | Number | A number from 0 to 360. | GradientGlowFilter.angle |

_GradientGlow_blurX | The amount of horizontal blur, in pixels. | Number | A number from 0 to 255. | GradientGlowFilter.blurX |

_GradientGlow_blurY | The amount of vertical blur, in pixels. | Number | A number from 0 to 255. | GradientGlowFilter.blurY |

_GradientGlow_colors | ||||

_GradientBevel_distance | The offset distance of the effect, in pixels. | Number | Any number. | GradientGlowFilter.distance |

_GradientGlow_knockout | Boolean | `true` or `false` . |
GradientGlowFilter.knockout | |

_GradientGlow_quality | The quality of the filter, which means the number of times to apply it to the object. | Number | A number from 0 (low quality) to 1 (medium quality) and above. | GradientGlowFilter.quality |

_GradientBevel_ratios | ||||

_GradientGlow_strength | The strength of the imprint or spread. | Number | A number from 0 to 255. | GradientGlowFilter.strength |

_GradientGlow_type | The placement of the filter effect on the object. | String | "inner", "outer", "full" | GradientGlowFilter.type |