(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…
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;