Typically we can construct a blur effect for many objects using the following.
var mcImage = new Image();
mcImage.addChild(otherImage1);
mcImage.addChild(otherImage2);
mcImage.addChild(otherImage2);
addChild(mcImage);
//some code to make a duplicate of mcImage, we do this so that we can recover the part of the image not blurred.
addChild(mcImage_duplicate);
var blur = new BlurFilter();
blurX = blurY = 10;
blur.quality = 1;
mcImage.mask = mcBlurArea; //the Area to be blur.
mcImage.filter = [blur];
We see that we make a duplicate of the mcImage we want to blur to recover the whole screen Objects, but this will become a CPU intensive when instead mcImage contains Many MovieClips.
Since Haxe language is now way better than AS3, I believe this is possible. How do we create a CPU friendly BlurEffect that would only blur portion of all Other Clips under the area covered my mcBlurArea (without making a duplicate of mcImage)?
I will try to draw mcImage into bitmap, in case mcImage is animating, I figure I could redraw bitmaps at 60 fps. I will give an update after I got it working, inputs from the community is always welcome
What if each child had its own bitmap? (Add a blur filter to the child, draw the child to a bitmap, then get rid of the filter.) That way, you won’t have to redraw the bitmaps every frame, and you can still move them independently.