Mappoint (Displacementmapfilter.mappoint Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

mapPoint (DisplacementMapFilter.mapPoint
property)
public mapPoint : Point
A
flash.geom.Point
movie clip from the upper-left corner of the map image.
The
property cannot be changed by directly modifying its value. Instead, you must
mapPoint
get a reference to
mapPoint
reference.
Availability: ActionScript 1.0; Flash Player 8
Example
The following example changes the
when a user clicks it.
filteredMc
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.mapPoint = new Point(-30, -40);
this.filters = new Array(filter);
this._x = 30;
this._y = 40;
}
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);
return txtBlock;
}
522
ActionScript classes
value that contains the offset of the upper-left corner of the target
, make the change to the reference, and then set
mapPoint
property on the existing MovieClip
to the
mapPoint

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF