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

Actionscript 2.0 language reference
Table of Contents

Advertisement

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
properties of the original one.
Example
The following example creates three DropShadowFilter objects and compares them;
is created by using the DropShadowFilter constructor;
filter_1
setting it equal to
filter_1
although
evaluates as being equal to
filter_2
contains the same values as
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]
- A new DropShadowFilter instance with all the
; and
clonedFilter
filter_1
, does not.
filter_1
DropShadowFilter (flash.filters.DropShadowFilter)
filter_2
is created by cloning
,
clonedFilter
is created by
. Notice that
filter_1
, even though it
535

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF