# DisplacementMapFilter masking

**URL:** <https://forum.kirupa.com/t/displacementmapfilter-masking/214158>\
**Category:** flash\
**Created:** [January 25, 2007, 11:42pm UTC](https://forum.kirupa.com/t/displacementmapfilter-masking/214158 "2007-01-25T23:42:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pi3rc3](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@pi3rc3](https://forum.kirupa.com/u/pi3rc3)\
**Post date:** [January 25, 2007, 11:42pm UTC](https://forum.kirupa.com/t/displacementmapfilter-masking/214158/1 "2007-01-25T23:42:55Z")

</div>

(AS3) im trying to dynamicly use the DisplacementMapFilter but when i use it the whole bitmap square gets the effect even though the displacementmap im using is a circle with transparent BG. is there a way to mask the displacementmapfilter so it effects only a specified spherical portion?

heres some code…

```auto
mapPoint = new Point(500, 300);
			componentX = 4;
			componentY = 4;
			scaleX1= 10;
			scaleY1 = 10;
			
			mapBitmap = new BitmapData(map.width, map.height,true);
			mapBitmap.draw(map);
			
			filter = new DisplacementMapFilter(mapBitmap, mapPoint,componentX,componentY, scaleX1, scaleY1);
			//filter.color=1;
			//filter.mode = DisplacementMapFilterMode.COLOR
			filterList = new Array;
			filterList.push(filter);
			game.myBack.filters = filterList;
			
			map.visible=false;

```
