views:

173

answers:

2

I'm creating a flash application that makes use of both the dropShadow filter and scaling of various sprites.

And therein lies the problem:

This filter supports Stage scaling. However, it does not support general scaling, rotation, and skewing. If the object itself is scaled (if scaleX and scaleY are set to a value other than 1.0), the filter is not scaled.

By happenstance the lack of rotation support is beneficial to me, but I really badly need the scaling to work. What's the best method for doing this?

Can I extend the DropShadow object and "make it" update?

Shall I make my own custom object that just recreates itself with a new .distance value to match the zoom level?

What's the best method to use (with performance in mind)?

A: 

I am using dropShadow filter like this and scale, rotate, skew works fine:

var localFilters :Array = new Array();
localFilters.push( dropShadowFilter );

component.filters = localFilters;

after that if you do for example :

var m:Matrix = new Matrix();
m.scale( 1.5, 2 );

component.transform.matrix = m;

the dropShadow filter will be scaled.

ghalex
Hm, I did a cut n paste of that and it's still scaling. No matter what I scale it to, the dropshadow "Distance" is always the number of pixels of the parent canvas, not the number of scaled pixels.
Andy Moore
A: 

i posted the same issue here...

http://www.actionscript.org/forums/showthread.php3?t=223959

one giant