280
ActionScript classes
var filter:BevelFilter = new BevelFilter(5, 45, 0xFFFF00, .8, 0x0000FF,
.8, 20, 20, 1, 3, "inner", false);
rect.filters = new Array(filter);
return rect;
}
clone (BevelFilter.clone method)
public clone() : BevelFilter
Returns a copy of this filter object.
Availability:
ActionScript 1.0; Flash Player 8
Returns
flash.filters.BevelFilter
- A new BevelFilter instance with all the same properties as
the original BevelFilter instance.
Example
The following example creates three BevelFilter objects and compares them. You can create
the
filter_1
object by using the BevelFilter constructor. You create the
filter_2
object by
setting it equal to
filter_1
. You create the
clonedFilter
by cloning
filter_1
. Notice that
while
filter_2
evaluates as being equal to
filter_1
,
clonedFilter
does not, even though
it contains the same values as
filter_1
.
import flash.filters.BevelFilter;
var filter_1:BevelFilter = new BevelFilter(5, 45, 0xFFFF00, .8, 0x0000FF,
.8, 20, 20, 1, 3, "inner", false);
var filter_2:BevelFilter = filter_1;
var clonedFilter:BevelFilter = 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]
// >> type: inner
// >> blurY: 20
// >> blurX: 20
// >> knockout: false
// >> strength: 1
// >> quality: 3
// >> shadowAlpha: 0.8
// >> shadowColor: 255
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...