EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Clone (Dropshadowfilter.clone Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DropShadowFilter (flash.filters.DropShadowFilter) 535
clone (DropShadowFilter.clone method)
public clone() : DropShadowFilter
Returns a copy of this filter object.
Availability: ActionScript 1.0; Flash Player 8
Returns
flash.filters.DropShadowFilter - A new DropShadowFilter instance with all the
properties of the original one.
Example
The following example creates three DropShadowFilter objects and compares them;
filter_1 is created by using the DropShadowFilter constructor; filter_2 is created by
setting it equal to
filter_1; and clonedFilter is created by cloning filter_1. Notice that
although
filter_2 evaluates as being equal to filter_1, clonedFilter, even though it
contains the same values as
filter_1, does not.
import flash.filters.DropShadowFilter;
var filter_1:DropShadowFilter = new DropShadowFilter(15, 45, 0x000000, .8,
16, 16, 1, 3, false, false, false);
var filter_2:DropShadowFilter = filter_1;
var clonedFilter:DropShadowFilter = filter_1.clone();
trace(filter_1 == filter_2); // true
trace(filter_1 == clonedFilter); // false
for(var i in filter_1) {
trace(">> " + i + ": " + filter_1[i]);
// >> clone: [type Function]
// >> hideObject: false
// >> strength: 1
// >> blurY: 16
// >> blurX: 16
// >> knockout: false
// >> inner: false
// >> quality: 3
// >> alpha: 0.8
// >> color: 0
// >> angle: 45
// >> distance: 15
}
for(var i in clonedFilter) {
trace(">> " + i + ": " + clonedFilter[i]);
// >> clone: [type Function]

Table of Contents

Related product manuals