How to make filters scale relatively with parent DisplayObject?

AS3 Question for .filters

(i’m using flashdevelop / flex sdk)

IS there any way filters applied to a DisplayObject (drop shadow, glow, bevel) can scale relatively with the parent (the DisplayObject it is inside)?

And what about other properties like .distance for drop shadow?

For example…

If I have a 100px rectangle with a 10px glow inside a container object, and I set scaleX/scaleY of the container to .1, I want the glow to inherit the scale change from the parent (1/10th the size) just as the display object does that the filter is applied to.

Instead, if you try this, you will see the glow stays at 10px no matter what scale the filter target or the container is transformed by.

Pseudocode example (steps to reproduce),

  1. create a sprite called _myOuterSprite on stage at scaleX = scaleY = 1

  2. create a sprite called _myInnerSprite inside _myOuterSprite at scaleX = scaleY = 1

  3. draw 100px rectangle into _myInnerSprite

  4. apply 10px glow to _myInnerSprite

  5. transform scale of _myOuterSprite to .1

Result:

  • child sprite (rectangle) scales to 1/10th the size
  • glow stays the same size

How can I make it so that glow scales to 1/10th as well?


…without capturing and scaling bitmap data
…without losing interactivity on objects
…in a way that would work visually for every filter, not just glow (drop shadow has distance property too, etc)