03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

function createDropShadowRectangle(name:String):MovieClip {<br />

var art:MovieClip = this.createEmptyMovieClip(name,<br />

this.getNextHighestDepth());<br />

var w:Number = 100;<br />

var h:Number = 100;<br />

art.beginFill(0x003366);<br />

art.lineTo(w, 0);<br />

art.lineTo(w, h);<br />

art.lineTo(0, h);<br />

art.lineTo(0, 0);<br />

art._x = 20;<br />

art._y = 20;<br />

}<br />

var filter:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, 0.8,<br />

16, 16, 1, 3, false, false, false);<br />

var filterArray:Array = new Array();<br />

filterArray.push(filter);<br />

art.filters = filterArray;<br />

return art;<br />

DropShadowFilter constructor<br />

public DropShadowFilter([distance:Number], [angle:Number], [color:Number],<br />

[alpha:Number], [blurX:Number], [blurY:Number], [strength:Number],<br />

[quality:Number], [inner:Boolean], [knockout:Boolean],<br />

[hideObject:Boolean])<br />

Creates a new DropShadowFilter instance with the specified parameters.<br />

Availability: <strong>ActionScript</strong> 1.0; Flash Player 8<br />

Parameters<br />

distance:Number [optional] - The offset distance for the shadow, in pixels. The default value<br />

is 4 (floating point).<br />

angle:Number [optional] - The angle of the shadow, 0 to 360° (floating point). The default<br />

value is 45.<br />

color:Number [optional] - The color of the shadow, in hexadecimal format 0xRRGGBB. The<br />

default value is 0x000000.<br />

alpha:Number [optional] - The alpha transparency value for the shadow color. Valid values<br />

are 0 to 1. For example, 0.25 sets a transparency value of 25%. The default value is 1.<br />

blurX:Number [optional] - The amount of horizontal blur. Valid values are 0 to 255 (floating<br />

point). The default value is 4. Values that are a power of 2 (such as 2, 4, 8, 16 <strong>and</strong> 32) are<br />

optimized to render more quickly than other values.<br />

DropShadowFilter (flash.filters.DropShadowFilter) 545

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!