Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-20-2009, 03:46 PM   #1
bradytimes
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:

Code:
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.addChild(childLine);
    this.filters = [new DropShadowFilter()];
		
    // Is there a way to prevent a shadow from appearing under 'childLine'
    //   childLine.filters = [] is already empty 
  }
}
Thanks!
bradytimes is offline   Reply With Quote
Old 11-20-2009, 04:28 PM   #2
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,833
Send a message via Skype™ to henke37
Default

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

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


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 07:02 AM.

///
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.