MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 604

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example creates three GlowFilter objects and compares them:
created by using the GlowFilter constructor;
; and
filter_1
clonedFilter
evaluates as being equal to
filter_2
same values as
filter_1
import flash.filters.GlowFilter;
var filter_1:GlowFilter = new GlowFilter(0x33CCFF, .8, 35, 35, 2, 3, false,
false);
var filter_2:GlowFilter = filter_1;
var clonedFilter:GlowFilter = 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]
// >> strength: 2
// >> blurY: 35
// >> blurX: 35
// >> knockout: false
// >> inner: false
// >> quality: 3
// >> alpha: 0.8
// >> color: 3394815
}
for(var i in clonedFilter) {
trace(">> " + i + ": " + clonedFilter[i]);
// >> clone: [type Function]
// >> strength: 2
// >> blurY: 35
// >> blurX: 35
// >> knockout: false
// >> inner: false
// >> quality: 3
// >> alpha: 0.8
// >> color: 3394815
}
604
ActionScript classes
filter_2
is created by cloning
filter_1
, does not.
is created by setting it equal to
. Notice that although
filter_1
,
, even though it contains the
clonedFilter
is
filter_1

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?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF