componentX:Number
x result. Possible values are the following:
(red)
1
(green)
2
(blue)
4
(alpha)
8
componentY:Number
y result. Possible values are the following:
(red)
1
(green)
2
(blue)
4
(alpha)
8
- The multiplier to use to scale the x displacement result from the map
scaleX:Number
calculation.
- The multiplier to use to scale the y displacement result from the map
scaleY:Number
calculation.
[optional] - The mode of the filter. Possible values are the following:
mode:String
— Wraps the displacement value to the other side of the source image.
"wrap"
— Clamps the displacement value to the edge of the source image.
"clamp"
— If the displacement value is out of range, ignores the displacement and uses
"ignore"
the source pixel.
— If the displacement value is outside the image, substitutes a pixel value
"color"
composed of the
[optional] - Specifies the color to use for out-of-bounds displacements. The
color:Number
valid range of displacements is 0.0 to 1.0. Use this parameter if
[optional] - Specifies what alpha value to use for out-of-bounds displacements.
alpha:Number
This is specified as a normalized value from 0.0 to 1.0. For example, .25 sets a transparency
value of 25%. The default is 1.0. Use this parameter if
Example
The following constructor function creates a new instance of the filter:
myFilter = new flash.filters.DisplacementMapFilter (mapBitmap, mapPoint,
componentX, componentY, scale, [mode], [color], [alpha])
The following example instantiates a new
bitmap and applies it to the text containing MovieClip object
518
ActionScript classes
- Describes which color channel to use in the map image to displace the
- Describes which color channel to use in the map image to displace the
and
properties of the filter.
alpha
color
is set to
mode
DisplacementMapFilter
txtBlock
is set to
mode
"color"
.
"color"
with a radial gradient
.
.
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?