VideoFilters API
Filter Documentation
blur
Blurs video using
BlurFilter class.
Parameters
type - (required) Value must be "blur".
blurX - (optional) Integer specifying amount of blur on the x axis. Default is 5.
blurY - (optional) Integer specifying amount of blur on the y axis. Default is 5.
quality - (optional) Integer from 0-15 specifying number of passes for the blur. Default is 1.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
blurX - (optional) Integer specifying amount of blur on the x axis. Default is 5.
blurY - (optional) Integer specifying amount of blur on the y axis. Default is 5.
quality - (optional) Integer from 0-15 specifying number of passes for the blur. Default is 1.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
color
Colors or tints video using
ColorMatrixFilter class.
Parameters
type - (required) Value must be "color".
matrix - (required) A 4x5 matrix defining the color transform of the video. The strings "IDENTITY", "GRAYSCALE" or "SEPIA" may also be used to reference built-in matrices.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
matrix - (required) A 4x5 matrix defining the color transform of the video. The strings "IDENTITY", "GRAYSCALE" or "SEPIA" may also be used to reference built-in matrices.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
composite
Combines multiple filters into a single effect.
Parameters
type - (required) Value must be "composite".
filters - (required) An array of filter objects.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
filters - (required) An array of filter objects.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
desaturate
Removes color saturation from the video.
Parameters
type - (required) Value must be "desaturate".
amount - (required) Number between 0-1 specifying amount to desaturate video. 0 is no desaturation. 1 is full desaturation, making the video grayscale.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
amount - (required) Number between 0-1 specifying amount to desaturate video. 0 is no desaturation. 1 is full desaturation, making the video grayscale.
blendMode - (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
findEdges
Uses the
ConvolutionFilter to highlight the edges of shapes in the video.
Parameters
type - (required) Value must be "findEdges".
threshold - (optional) Number specifying the amount of contrast in the image that determines an edge. Default is 60.
grayscale - (optional) Boolean value specifying whether the filtered image should be reduced to grayscale.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
gradientMap
Maps the brightness values of the video to a gradient.
Parameters
type - (required) Value must be "gradientMap".
colors - (required) An array of RGB color values for the gradient. The number of colors must equal the number of ratio values.
ratios - (required) An array of values ranging from 0 to 255 (0xFF) specifying where the colors fall on the gradient. The number of ratio values must equal the number of colors.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
colors - (required) An array of RGB color values for the gradient. The number of colors must equal the number of ratio values.
ratios - (required) An array of values ranging from 0 to 255 (0xFF) specifying where the colors fall on the gradient. The number of ratio values must equal the number of colors.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
grid
Breaks the video up into a grid pattern.
Parameters
type - (required) Value must be "grid".
rows - (required) Integer determining the number of rows in the grid.
columns - (required) Integer determining the number of columns in the grid.
groutColor - (optional) The RGB color to display between images if the grid does not fit perfectly within the video window. Default is 0x000000.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
rows - (required) Integer determining the number of rows in the grid.
columns - (required) Integer determining the number of columns in the grid.
groutColor - (optional) The RGB color to display between images if the grid does not fit perfectly within the video window. Default is 0x000000.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
inverse
Inverts the colors in the video.
Parameters
type - (required) Value must be "inverse".
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
isolateColor
Isolates red, green or blue from their respective color channels.
Parameters
type - (required) Value must be "isolateColor".
channel - (optional) Integer specifying color channel to isolate. 1 for red, 2 for green or 4 for blue. Default is 1.
low - (optional) Integer between 0-255 specifying the amount of brightness in the specified color channel required as a minimum to isolate. Default is 0.
high - (optional) Integer between 0-255 specifying the maximum amount of brightness in the specified color channel that should be isolated. Default is 255 (0xFF).
threshold - (optional) Integer between 0-255 specifying the maximum amount of brightness that can appear in the other two color channels to still allow isolation in the specified color channel. For instance, if the red channel is selected for isolation, passing 0 as the threshold will only allow pure red to be isolated. Passing a higher threshold will allow red mixed with a little blur or green to still be isolated. Default is 20.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
channel - (optional) Integer specifying color channel to isolate. 1 for red, 2 for green or 4 for blue. Default is 1.
low - (optional) Integer between 0-255 specifying the amount of brightness in the specified color channel required as a minimum to isolate. Default is 0.
high - (optional) Integer between 0-255 specifying the maximum amount of brightness in the specified color channel that should be isolated. Default is 255 (0xFF).
threshold - (optional) Integer between 0-255 specifying the maximum amount of brightness that can appear in the other two color channels to still allow isolation in the specified color channel. For instance, if the red channel is selected for isolation, passing 0 as the threshold will only allow pure red to be isolated. Passing a higher threshold will allow red mixed with a little blur or green to still be isolated. Default is 20.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
levels
Adjusts brightness levels in the video or color channels.
Parameters
type - (required) Value must be "levels".
levels - (optional) Either an array of three values ranging from 0-255, specifying the low, mid and high level adjustments for the video, or an object with three properties, red, green and blue, each with an array of values ranging from 0-255 specifying the level adjustments for each individual channel.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
levels - (optional) Either an array of three values ranging from 0-255, specifying the low, mid and high level adjustments for the video, or an object with three properties, red, green and blue, each with an array of values ranging from 0-255 specifying the level adjustments for each individual channel.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
noise
Adds pixelated noise to the video.
Parameters
type - (required) Value must be "noise".
strength - (required) Number between 0-1 specifying amount of noise to apply to the image.
animated - (optional) Boolean value specifying whether the noise should be redrawn each frame.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
strength - (required) Number between 0-1 specifying amount of noise to apply to the image.
animated - (optional) Boolean value specifying whether the noise should be redrawn each frame.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
posterize
Reduces the number of colors in the video.
Parameters
type - (required) Value must be "posterize".
numLevels - (required) Integer defining the maximum number of colors in each channel for the video.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
numLevels - (required) Integer defining the maximum number of colors in each channel for the video.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
transform
Applies a transform matrix to the video.
Parameters
type - (required) Value must be "transform".
matrix - (required) An instance of Matrix that defines the transform to apply to the video.
color - (optional) The RGB color that should be revealed if the video no longer covers the full video screen. Default is 0x000000.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
matrix - (required) An instance of Matrix that defines the transform to apply to the video.
color - (optional) The RGB color that should be revealed if the video no longer covers the full video screen. Default is 0x000000.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
translate
Moves the video within the video window.
Parameters
type - (required) Value must be "translate".
x - (optional) The number of pixels by which to move the video on the x axis. Default is 0.
y - (optional) The number of pixels by which to move the video on the y axis. Default is 0.
color - (optional) The RGB color that should be revealed if the video no longer covers the full video screen. Default is 0x000000.
wrapAround - (optional) Boolean value that determines whether the video, if translated offscreen by any amount, wraps to the opposite side of the screen.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
x - (optional) The number of pixels by which to move the video on the x axis. Default is 0.
y - (optional) The number of pixels by which to move the video on the y axis. Default is 0.
color - (optional) The RGB color that should be revealed if the video no longer covers the full video screen. Default is 0x000000.
wrapAround - (optional) Boolean value that determines whether the video, if translated offscreen by any amount, wraps to the opposite side of the screen.
blendMode - (optional) (optional) The MovieClip blendMode to apply to the filtered image before it is applied to the video image. Default is "normal".
alpha - (optional) The alpha value from 0-100 to apply to the filtered image before it is applied to the video image. Default is 100.
