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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

The following example changes the blurY property on an existing movie clip when a user<br />

clicks it.<br />

import flash.filters.DropShadowFilter;<br />

var mc:MovieClip = createDropShadowRectangle("DropShadowBlurY");<br />

mc.onRelease = function() {<br />

var filter:DropShadowFilter = this.filters[0];<br />

filter.blurY = 40;<br />

this.filters = new Array(filter);<br />

}<br />

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 />

clone (DropShadowFilter.clone method)<br />

public clone() : DropShadowFilter<br />

Returns a copy of this filter object.<br />

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

Returns<br />

DropShadowFilter - A new DropShadowFilter instance with all the properties of the original<br />

one.<br />

DropShadowFilter (flash.filters.DropShadowFilter) 541

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

Saved successfully!

Ooh no, something went wrong!