Shape.getcubicsegmentpoints() – Adobe Extending Flash Professional CS4 User Manual
Page 409
387
EXTENDING FLASH CS4 PROFESSIONAL
Shape object
Parameters
None.
Returns
Nothing.
Description
Method; defines the end of an edit session for the shape. All changes made to the Shape object or any of its subordinate
parts will be applied to the shape. You must use this method after issuing any commands that change the Shape object
or any of its subordinate parts.
Example
The following example takes the currently selected shape and removes the first edge in the edge array from it:
var shape = fl.getDocumentDOM().selection[0];
shape.beginEdit();
shape.deleteEdge(0);
shape.endEdit();
shape.getCubicSegmentPoints()
Availability
Flash CS4 Professional.
Usage
shape.getCubicSegmentPoints(cubicSegmentIndex)
Parameters
cubicSegmentIndex
An integer that specifies the cubic segment for which points are returned.
Returns
An array of points that define a cubic curve for the Edge object that corresponds to the specified cubicSegmentIndex
(see
Description
Method; returns an array of points that define a cubic curve.
Example
The following example displays the x and y values for each point on the cubic curve of the first edge of the selection:
var elem = fl.getDocumentDOM().selection[0]; fl.trace("index " + i +" x: " + cubicPoints[i].x + " y: " + cubicPoints[i].y); }
var index = elem.edges[0].cubicSegmentIndex;
var cubicPoints = elem.getCubicSegmentPoints(index);
for (i=0; i