C
SWFFilter
newBlurFilter(SWFBlur blur /* blur */)
SWFBlur
newSWFBlur(float blurX /* horiz. blur amount */,
float blurY /* vert. blur amount */,
int passes /* number of passes. should be <= 3 */)This filter is based on a "box filter", which is a simple median pixel filter. See http://en.wikipedia.org/wiki/Box_blur for more details.
If passes is set to 3, it is a approximation of a Gaussian filter.
For performance reasons, passses should be <= 3.
Example
/* ... */ SWFBlur blur; SWFFilter f; blur = newSWFBlur(5,5,2); f = newBlurFilter(blur); /* ... */ // attach filter to DisplayItem // display item must be a MovieClip, Button or TextField instance SWFDisplayItem_addFilter(item, f); /* ... */
PHP
/* ... */ $bl = new SWFBlur(5, 5, 2); $f = new SWFFilter(SWFFILTER_TYPE_BLUR, $bl); $bu = new SWFButton(); $bu->addShape($s, SWFBUTTON_UP | SWFBUTTON_HIT | SWFBUTTON_OVER | SWFBUTTON_DOWN); $item = $m->add($bu); $item->addFilter($f); /* ... */