beautypg.com

Fill.overflow, Fill.posarray – Adobe Extending Flash Professional CS5 User Manual

Page 225

background image

203

EXTENDING FLASH PROFESSIONAL

Fill object

Last updated 5/2/2011

Example
The following example uses the

fill.matrix

property to specify a gradient fill for the current selection:

var fill = fl.getDocumentDOM().getCustomFill();

fill.style = 'radialGradient';

fill.colorArray = ['#00ff00','#ff00ff'];

fill.posArray = [0, 255];

fill.focalPoint = 100;

fill.linearRGB = false;

fill.overflow = 'repeat';

var mat = fl.getDocumentDOM().selection[0].matrix;

mat.a = 0.0167083740234375;

mat.b = -0.0096435546875;

mat.c = 0.0312957763671875;

mat.d = 0.05419921875;

mat.tx = 288.65;

mat.ty = 193.05;

for (i in mat) {

fl.trace(i+' : '+mat[i]);

}

fl.getDocumentDOM().setCustomFill(fill);

fill.overflow

Availability
Flash 8.

Usage

fill.overflow

Description
Property; a string that specifies the behavior of a gradient’s overflow. Acceptable values are

"extend"

,

"repeat"

, and

"reflect"

; the strings are not case-sensitive. The default value is

"extend"

.

Example
The following example specifies that the behavior of the overflow for the current selection should be

"extend"

:

var fill = fl.getDocumentDOM().getCustomFill();

fill.overflow = "extend";

fl.getDocumentDOM().setCustomFill(fill);

fill.posArray

Availability
Flash MX 2004.

Usage

fill.posArray

This manual is related to the following products: