Thank you for the reply.
I tested it using your suggestion, and it seems to behave properly if
I use MovieClip.filters instead of using applyFilter. However, since
I want the end result to be a bitmap (for animation purposes), I
wrote a little workaround code... as follows:
// draw bitmap 1
var glowFilterMC = parentMC.createEmptyMovieClip("glowfilter_mc",
parentMC.getNextHighestDepth());
var glowBmp = new BitmapData(targetMC._width, targetMC._height, true,
0x000000);
glowFilterMC.attachBitmap(glowBmp, 1, "auto", true);
glowBmp.draw(targetMC);
// apply glow filter with knockout
var filter = new GlowFilter(0xFFFFFF, 1, 5, 5, 5, 1, false, true);
glowFilterMC.filters = [filter];
// draw bitmap 2
var outlineMC = parentMC.createEmptyMovieClip("outline_mc",
parentMC.getNextHighestDepth());
var outlineBmp = new BitmapData(glowFilterMC._width,
glowFilterMC._height, true, 0x000000);
outlineMC.attachBitmap(outlineBmp, 1, "auto", true);
outlineBmp.draw(glowFilterMC);
// dispose of bitmap 1 and its holder
glowBmp.dispose();
glowFilterMC.removeMovieClip();
Quite a few more lines of code than the original method, but hey..
it works.
-Danro
On Jul 8, 2006, at 10:21 PM, John Grden wrote:
Have you tried just applying the filter to the movieclip that the
bitmapdata
object is attached to rather than using applyFilter?
On 7/8/06, Dan Rogers <[EMAIL PROTECTED]> wrote:
Yesterday, I posted this topic regarding the inversion of a bitmap
alpha channel, but the root of the problem is that I am trying to
find a workaround for the GlowFilter knockout effect.
For some reason, when I programatically apply a GlowFilter to a
BitmapData object, and pass inner = false, with knockout = true, I
get this bizarre zebra effect.... I've provided code and a link to a
side by side comparison screenshot.
Here is an example of the code I am using:
var filter = new GlowFilter(0xFFFFFF, 1, 5, 5, 5, 1, false, true);
myBitmap.applyFilter(myBitmap, myBitmap.rectangle, new Point(0, 0),
filter);
Following is a screen shot of the issue. The left side is the result
when simply using the GlowFilter without passing inner or knockout,
and the right side is the strange zebra effect I get when I use the
above code.
http://download.danro.net/flashcoders/glowfilter_bug.jpg
Has anyone else dealt with this?
-Danro
On Jul 7, 2006, at 3:29 PM, Dan Rogers wrote:
> Hi gang,
>
> I am trying to invert the alpha channel of a BitmapData object and
> destructively apply it to another bitmap using copyPixels. Has
> anyone inverted an alpha channel on a bitmap? I assume use
> applyFilter with ColorMatrixFilter, but I am not very swift in
> figuring out the correct color matrix settings to use.
>
> Thanks,
> -Danro
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com