Differences between revisions 2 and 3
Revision 2 as of 2008-09-06 12:07:36
Size: 1315
Editor: klaus
Comment:
Revision 3 as of 2008-09-06 12:08:11
Size: 1317
Editor: klaus
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
A glow filter is a simple variant of the DropShadowFilter. Its only difference is the missing angle parameter and therefore it should be more performant.

See DropShadowFilter.
Line 16: Line 20:
A glow filter is a simple variant of the DropShadowFilter. Its only difference is the missing angle parameter and therefore it should be more performant.

See DropShadowFilter.

A glow filter is a simple variant of the DropShadowFilter. Its only difference is the missing angle parameter and therefore it should be more performant.

See DropShadowFilter.

C

SWFFilter 
newGlowFilter(SWFColor color /* color of shadow */, 
              SWFBlur blur /* blur */, 
              float strength /* strength */, 
              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 */)

Example

/* ... */
SWFBlur blur;
SWFFilter f;
SWFColor c;
SWFDisplayItem item;
/* ... */
blur = newSWFBlur(5,5,2);

c.red = 0;
c.green = 0;
c.blue = 0;
c.alpha = 0xff;

f = newGlowFilter(c, blur, 1.0, FILTER_MODE_INNER | FILTER_MODE_KO);    
/* .... *// 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);

$c = Array();
$c["red"] = 0;
$c['green'] = 0;
$c['blue'] = 0;
$c['alpha'] = 0xff;

$f = new SWFFilter(SWFFILTER_TYPE_GLOW, $c, $bl, 1.0, SWFFILTER_MODE_INNER | SWFFILTER_MODE_KO);

/* ... */
?>

libming: GlowFilter (last edited 2009-06-25 03:09:35 by localhost)