views:

336

answers:

3

I want to apply a blur filter to an image in Flash CS4. I understand how to apply the filer but is there a way to apply it in differing amounts to different parts of the image? I.E. I want to have the edges very blurry while I want the center to stay relatively sharp (apply the blur filter as if it were a gradient coming from the center out).

A: 

You'd have to do it in multiple passes. Basically generate a bunch of BitmapData objects of each successively smaller rectangle of image area.

Jotham
A: 

you could have a look at Adobe Pixel Bender, create your own filter for Flash and apply it to the image.

Les
A: 

To get this effect, you will need three layers. Here are the layers from bottom to top:

  1. The original non-blurred image (bottom most layer).
  2. Copy of the original image, with the full blur applied.
  3. Gradient mask. Create a shape with a black and white fill of the gradient you want (needs to be in a movieclip), and place it over the top. You can then use it to mask the blur layer (you will need to apply the mask using Actionscript, because that is the only way you can have a gradient mask).

You can choose to either mask the original image or the blurred one, but the mask layer will need to be on top of the non-masked layer.

Hope this helps.

TandemAdam