- The filter is applied on the alpha channel. The result is the shadow pane.
- The angle is measure in radians, 0 means right side of the object.
- The distance is measured in pixels.
- Possible composition flags:
- FILTER_MODE_INNER (inner shadow, outer shadow is default)
- FILTER_MODE_KO (knock out mode)
- The composite pixels are the result of multiplying the provided filter color and the shadow pane pixels.
See also BlurFilter.
C
SWFFilter newDropShadowFilter(SWFColor color /* color of shadow */,
SWFBlur blur /* blur */,
SWFShadow shadow /* shadow */,
int flags /* FILTER_MODE_INNER, FILTER_MODE_KO */)
SWFBlur newSWFBlur(float blurX /* horiz. blur amount */,
float blurY /* vert. blur amount */,
int passes /* number of passes. shoub be <= 3 */)
SWFShadow newSWFShadow(float angle /* angle in radians */,
float distance /* distance in px*/,
float strength /* strength */)
Example
SWFBlur blur; SWFFilter f; SWFShadow shadow; SWFColor c; blur = newSWFBlur(5,5,2); shadow = newSWFShadow(0.79, 5, 1); c.red = 0; c.green = 0; c.blue = 0; c.alpha = 0xff; f = newDropShadowFilter(c, blur, shadow, FILTER_MODE_INNER | FILTER_MODE_KO); /* ... */ // attach filter to DisplayItem // display item must be a MovieClip, Button or TextField instance SWFDisplayItem_addFilter(item, f); /* ... */