PDA

View Full Version : Blurring everything but movie


adam89
02-21-2007, 09:29 PM
Hi,

I'm trying to make a transition so before a movie plays everything in the scene blurs except for the movie.

Is there a simple way to achieve this, besides basically making a picture of everything in the scene and blur that layer?

I suppose, I'm basically asking if I can create a layer of blur that I can position between the movie layer and everything else.

Thanks,

Adam

Noct
02-21-2007, 10:17 PM
You would either use a blur filter on everything individually, or blur a screenshot.

If you were going to blur a screenie, you would just hide the mc in question, run a bitMapdata object to grab the screen, then paste that into a movieClip, return your mc visibility to true, and then swap its depth above the screenshot.

adam89
02-21-2007, 11:27 PM
thanks for the quick reply.

i couldn't find anything about using bitMapdata to make a screenshot... could you be a little more specific on how to do that?

thanks again.

Noct
02-22-2007, 04:58 PM
//Create new bitMapDataObject at the full width of the stage
bmap = new flash.display.BitmapData(Stage.width,Stage.height, true, 0);
//Hide the mC you DONT want blurred
this.my_mc._visible=false;
//Take a screenshot of "this" (root)
bmap.draw(this);
//Create empty Clip to hold the screenShot
this.createEmptyMovieClip("emptyClip", this.getNextHighestDepth());
//Attach the screenShot
emptyClip.attachBitmap(bmap, 1);
//Blur The ScreenShot
import flash.filters.BlurFilter;
var blurr:BlurFilter = new BlurFilter(5,5,50);
// apply the filter to emptyClip
emptyClip.filters = [blurr];
//Show the mC you hid
this.my_mc._visible=true;
//Swap it to above the new Screenshot
this.my_mc.swapDepths(emptyClip.getNextHighestDept h());

adam89
02-23-2007, 06:18 PM
thank you so much, man. i'll try it today!!

Noct
02-23-2007, 07:05 PM
Glad to help, good luck.