Adobe Extending Flash Professional CS4 Manual do Utilizador Página 409

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 560
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 408
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
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);
}
Vista de página 408
1 2 ... 404 405 406 407 408 409 410 411 412 413 414 ... 559 560

Comentários a estes Manuais

Sem comentários