Jump to content
Search Community

problem with Blur Filter and masks [SOLVED] (kinda)

willwork test
Moderator Tag

Recommended Posts

I've got a scrolling menu with a dynamically created mask over the clip Holder. When you tween the clip holder and use the blur filter, it completely screws up the mask. It basically changes the scale of the mask to perhaps a quarter the size...

This seems like a big issue to me....

Link to comment
Share on other sites

I'd need to see your code/FLA to know what's going on, but I'm 99.99% sure it has nothing to do with a bug in TweenLite/Max. I just tested a mask while blurring the masked object and it worked perfectly. Maybe there's something different about my setup though.

 

Please post code (or even better, a simple FLA that demonstrates the issue)

Link to comment
Share on other sites

I am facing a similar issue with the blur as well as the bevel filter. I think the problem is with the 'remove' property.

 

The mask is dynamically drawn in a shape object and applied through actionscript. I feel that the filters in some way change the size of the mask but refreshing the window or maximizing it solves the problem.

Would welcome any solutions if other people are also facing a similar problem.

 

Please test the following code with the last line commented and then active.

 

import gs.*;
import gs.easing.*;
import gs.plugins.*;
TweenPlugin.activate([blurFilterPlugin, TransformAroundPointPlugin, SetSizePlugin, TintPlugin, VolumePlugin, BevelFilterPlugin, EndArrayPlugin, ColorMatrixFilterPlugin, GlowFilterPlugin, AutoAlphaPlugin, QuaternionsPlugin, RoundPropsPlugin, ColorTransformPlugin, ShortRotationPlugin, FramePlugin, RemoveTintPlugin, BezierThroughPlugin, TransformAroundCenterPlugin, VisiblePlugin, FrameLabelPlugin, BezierPlugin, HexColorsPlugin, DropShadowFilterPlugin]);


var mySquare:Sprite = new Sprite();
var maskCir:Shape = new Shape();

mySquare.graphics.beginFill(0x000000);
mySquare.graphics.drawRect(0,0,200,200);
mySquare.graphics.endFill();

maskCir.graphics.beginFill(0x000000);
maskCir.graphics.drawCircle(100,100,50);
maskCir.graphics.endFill();

addChild(mySquare);
addChild(maskCir);
mySquare.mask=maskCir;

TweenMax.to(mySquare, 2, {blurFilter:{blurX:20, blurY:20, remove:true}});

Link to comment
Share on other sites

It certainly looks like there's a bug in the Flash Player (unrelated to TweenLite/Max) because the position seems to shift intermittently (about 50% of the time in my tests) with the following code (notice there's no TweenLite/Max stuff):

 

import flash.display.*;
import flash.filters.*;

var mySquare:Sprite = new Sprite();
var maskCir:Shape = new Shape();

mySquare.graphics.beginFill(0x000000);
mySquare.graphics.drawRect(0,0,200,200);
mySquare.graphics.endFill();

maskCir.graphics.beginFill(0x000000);
maskCir.graphics.drawCircle(100,100,50);
maskCir.graphics.endFill();

addChild(mySquare);
addChild(maskCir);
mySquare.mask=maskCir;

mySquare.filters = [new BlurFilter(20, 20, 2)];

setTimeout(removeFilters, 1000);

function removeFilters():void {
mySquare.filters = [];
}

Link to comment
Share on other sites

  • 5 months later...

Just chiming in to note that I've had this problem, too: I'm using TimelineLite (LOVE it, btw!), but one of the tweens in that array applies a blur filter to a dynamically-masked display object; if I use remove:true in the blurFilter's properties list, I get that weird shifting issue. To counteract it in the meantime, I'm just reapplying the mask immediately after the blur filter is removed...kinda hack-y, but it's working for now!

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I went around this problem just by setting the both mask and masked content's cacheAsBitmap on true.

It work then very vell.

 

Hope it will help you.

 

++, and thank you again for this great animation engine!

bone

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...