Adobe Extending Flash Professional CS5 Manuale Utente Pagina 405

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 565
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 404
383
EXTENDING FLASH PROFESSIONAL
Shape object
Last updated 5/2/2011
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
edge.cubicSegmentIndex).
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];
var index = elem.edges[0].cubicSegmentIndex;
var cubicPoints = elem.getCubicSegmentPoints(index);
for (i=0; i<cubicPoints.length; i++) {
fl.trace("index " + i +" x: " + cubicPoints[i].x + " y: " + cubicPoints[i].y);
}
Vedere la pagina 404
1 2 ... 400 401 402 403 404 405 406 407 408 409 410 ... 564 565

Commenti su questo manuale

Nessun commento