Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Thread Tools Rate Thread Display Modes
Old 11-20-2009, 03:46 PM   #1
Registered User
Join Date: Jun 2008
Posts: 10
Default How to exclude DropShadowFilter from children?

I'm working with a Sprite that has multiple children. I want to apply a DropShadow filter to the main sprite, but not it's children. Is there a way to exclude filter effects from children?

Here's a simple example:

class Foo extends Sprite {
  public function Foo() {
    graphics.lineStyle(10, 0xff0000);
    graphics.moveTo(-100, -100);
    graphics.lineTo(100, 100);
    // draw a second line, forming an 'X'
    var childLine:Sprite = new Sprite();
    childLine.graphics.lineStyle(10, 0x0000ff);
    childLine.graphics.moveTo(100, -100);
    childLine.graphics.lineTo(-100, 100);
    this.filters = [new DropShadowFilter()];
    // Is there a way to prevent a shadow from appearing under 'childLine'
    //   childLine.filters = [] is already empty 
bradytimes is offline   Reply With Quote
Old 11-20-2009, 04:28 PM   #2
Senior Member
henke37's Avatar
Join Date: Mar 2009
Location: Sweden
Posts: 10,679
Send a message via Skype™ to henke37

No, it is not possible, move the children out.
henke37 is online now   Reply With Quote
Old 11-20-2009, 04:30 PM   #3
Registered User
Join Date: Jun 2008
Posts: 10

bummer, I was afraid of that. thanks!
bradytimes is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:10 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.