beautypg.com

Shape.numcubicsegments, Shape.vertices – Adobe Extending Flash Professional CS4 User Manual

Page 412

background image

390

EXTENDING FLASH CS4 PROFESSIONAL

Shape object

Usage

shape.members

Description
Read-only property; an array of objects in the currently selected group. This property is available only if the value of

shape.isGroup

is

true

). Raw shapes in the group are not included in the

shape.members

array.

For example, if the group contains three drawing objects and three raw shapes, the

shape.members

array contains

three entries, one for each of the drawing objects. If the group contains only raw shapes, the array is empty.

Example
The following code displays the number of cubic segments of each drawing object in the currently selected group:

var shapesArray = fl.getDocumentDOM().selection[0].members;
for (i=0; i

fl.trace(shapesArray[i].numCubicSegments);

}

See also

shape.isGroup

shape.numCubicSegments

Availability
Flash CS4 Professional.

Usage

shape.numCubicSegments

Description
Read-only property; the number of cubic segments in the shape.

Example
Assuming a square or rectangle shape is selected, the following code displays “4” in the Output panel:

var theShape = fl.getDocumentDOM().selection[0];
fl.trace(theShape.numCubicSegments);

shape.vertices

Availability
Flash MX 2004.

Usage

shape.vertices