Mode (Displacementmapfilter.mode Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

mode (DisplacementMapFilter.mode property)

public mode : String
The mode for the filter. Possible values are the following:
— Wraps the displacement value to the other side of the source image. This is the
"wrap"
default value.
— 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
Availability: ActionScript 1.0; Flash Player 8
Example
The following example modifies
and then changes the
a user clicks it.
import flash.filters.DisplacementMapFilter;
import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
var filteredMc:MovieClip = createDisplacementMapRectangle();
filteredMc.onPress = function() {
var filter:DisplacementMapFilter = this.filters[0];
filter.scaleY = 25;
filter.mode = "ignore";
this.filters = new Array(filter);
}
function createDisplacementMapRectangle():MovieClip {
var mapBitmap:BitmapData = createGradientBitmap(300, 80, 0xFF000000,
"radial");
var filter:DisplacementMapFilter = new DisplacementMapFilter(mapBitmap,
new Point(-30, -30), 1, 1, 10, 10, "wrap", 0x000000, 0x000000);
var txtBlock:MovieClip = createTextBlock();
txtBlock._x = 30;
txtBlock._y = 30;
txtBlock.filters = new Array(filter);
524
ActionScript classes
and
properties of the filter.
alpha
color
to create a displacement value that is out of range
scaleY
property on the existing MovieClip
mode
to
filteredMc
ignore
when

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF