When a filter is applied to a movie clip, it also applies to the visible
area of child objects.

If you want to apply the filter only to some parts of the container, create
a separate child object for the shadow and apply the filter to that alone.

E.g.

class Container extends Sprite
{
    private var m_shadow:Sprite;

    public function Container()
    {
        this.m_shadow = new Sprite();
        this.m_shadow.beginFill(0x000000);
        this.m_shadow.drawRect(0, 0, 100, 100);
        this.m_shadow.endFill();
        this.m_shadow.filters = [new DropShadowFilter()];
        this.addChild(this.m_shadow);

        // Add rest of your objects here
    }
}


On Tue, May 3, 2011 at 6:12 PM, Suree <[email protected]> wrote:

> Hi
>
> I have a custom component which  extends canvas.
>
> I need to add DropShadowFilter to this component on some condition,it
> works fine but The DropShadow effect is propegated to the children
> also,
>
> Can anybody help me how to remove the filter from the children.
>
> I have already tried by assigning empty array to filters property of
> each children, but still the effect shows..
>
> Hope i explained my problem correctly
>
> Thanks
> Suresh
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to