beautypg.com

Stroke.shapefill, Stroke.space – Adobe Extending Flash Professional CS5 User Manual

Page 427

background image

405

EXTENDING FLASH PROFESSIONAL

Stroke object

Last updated 5/2/2011

Description
Property; a string that specifies the type of scale to be applied to the stroke. Acceptable values are

"normal"

,

"horizontal"

,

"vertical"

, and

"none"

.

Example
The following example sets the scale type of the stroke to

horizontal

:

var myStroke = fl.getDocumentDOM().getCustomStroke();

myStroke.scaleType = "horizontal";

fl.getDocumentDOM().setCustomStroke(myStroke);

stroke.shapeFill

Availability
Flash 8.

Usage

stroke.shapeFill

Description
Property; a

Fill object

that represents the fill settings of the stroke.

Example
The following example specifies fill settings and then applies them to the stroke:

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

fill.linearGradient = true;

fill.colorArray = [ 00ff00, ff0000, fffff ];

var stroke = fl.getDocumentDOM().getCustomStroke();

stroke.shapeFill = fill;

fl.getDocumentDOM().setCustomStroke(stroke);

stroke.space

Availability
Flash MX 2004.

Usage

stroke.space

Description
Property; a string that specifies the spacing of a hatched line. This property is available only if the

stroke.style

property is set to

hatched

(see

stroke.style

). Acceptable values are

"very close"

,

"close"

,

"distant"

, and

"very distant"

.

Example
The following example sets the

space

property to

close

for a stroke style of

hatched

:

This manual is related to the following products: