I\'m trying to add a filter in AS3/Flex SDK. I can add a filter just fine to any one single object - but I want to apply the filter to everything that is a child of a c
As I see it, you have two possible approaches:
put everthing you want to blur in a separate container as the rest and apply the filters to that container.
create a BitmapData of the size of the stage (or the part you want to blur), draw the stage, applyFilter, add it to the the display list (on top of everything) and on top of that add all sprites that shouldn't be blurred (I imagine an alert box or similar). Note that you should update the BitmapData on resize.
UPDATE: Your code seems correct, but I'm not familiar with Flex, so maybe you can't add filters to Canvas (is it a DisplayObject?)... maybe setting his cacheAsBitmap to false works (it's quite buggy sometimes)... anyway, something like this should do the trick:
var container=new Sprite();
myCanvas.addChild(container);
container.addChild(new vectorImage());
container.addChild(new vectorImage2());
container.filters=[blur];
or maybe Canvas has a container property already...
Cheers...