# AS3 bitmap data. Blur won't become transparent

**URL:** <https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040>\
**Category:** Uncategorized\
**Created:** [May 22, 2008, 10:13am UTC](https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040 "2008-05-22T10:13:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 22, 2008, 10:13am UTC](https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040/1 "2008-05-22T10:13:19Z")

</div>

Hi. I am trying to finally get my head around bitmapdata and filters. I have made a simple flash that has a movieclip of a circle in the library. I add it to the stage and then make it follow the mouse. Then i use it to draw to a bitmap and then apply a blur. The problem is that the blur doesn’t become transparent, and eventually fills the whole screen. I’ve tried using a colorTransform and a ColorMatrixFilter but they don’t seem to work.

Here’s the code. What i really want is the blur to gradually become transparent towards the edges, in the way a gaussian blur would work in PS.

```auto
var bmd:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, true, 0xFFFFFF);
var bm:Bitmap = new Bitmap(bmd);

addChild (bm);
var bf:BlurFilter = new BlurFilter(6,6,1);
/*var cmf:ColorMatrixFilter = new ColorMatrixFilter([0.9,0,0,0,0,
						  0,0.9,0,0,0,
						  0,0,0.9,0,0,
						  0,0,0,0.6,0]);*/
var cTransform:ColorTransform = new ColorTransform();
cTransform.alphaMultiplier = 0.65;
var gfx:bmGraphic = new bmGraphic();
addChild(gfx);
this.addEventListener(Event.ENTER_FRAME, frameHandler);

function frameHandler(e:Event):void{
	gfx.x = stage.mouseX - (gfx.width/2);
	gfx.y = stage.mouseY - (gfx.width/2);
	bmd.colorTransform(bmd.rect, cTransform);
	bmd.applyFilter(bmd, bmd.rect, new Point(0,0), bf);
	bmd.draw(this);
}

```

If anyone can help me that would be great. I feel like i’m missing the point here.

edit: Oops. Thought i was in the as3 section … sorry.

---

<div class="post-metadata">

**Author:** ![substance](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@substance](https://forum.kirupa.com/u/substance)\
**Post date:** [May 23, 2008, 5:25pm UTC](https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040/2 "2008-05-23T17:25:21Z")

</div>

Something like this?

[egg](http://teamimpulse9.com/egg.fla)

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 23, 2008, 5:45pm UTC](https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040/3 "2008-05-23T17:45:54Z")

</div>

That would be exactly what i wanted, if it wasn’t doing the same as mine. Turn the stage to white and you’ll see that what looks like transparent is actually just filling the stage with opaque black.

---

<div class="post-metadata">

**Author:** ![admin86skf](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@admin86skf](https://forum.kirupa.com/u/admin86skf)\
**Post date:** [May 28, 2008, 6:46am UTC](https://forum.kirupa.com/t/as3-bitmap-data-blur-wont-become-transparent/261040/4 "2008-05-28T06:46:20Z")

</div>

Thanks for landlord’s sharingwe should work together to build this forum as a knowledge-based, professional forum.go to [skf Bearing](http://www.top-bearing.com/skf_bearing/)
