Adobe Extending Flash Professional CS4 Manuale Utente Pagina 205

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 560
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 204
183
EXTENDING FLASH CS4 PROFESSIONAL
Edge object
Description
Method; returns a HalfEdge object.
Example
The following example stores the half edges of the specified edge in the hEdge0 and hEdge1 variables:
var shape = fl.getDocumentDOM().selection[0];
var edge = shape.edges[0];
var hEdge0 = edge.getHalfEdge(0);
var hEdge1 = edge.getHalfEdge(1);
edge.id
Availability
Flash MX 2004.
Usage
edge.id
Description
Read-only property; an integer that represents a unique identifier for the edge.
Example
The following example stores a unique identifier for the specified edge in the my_shape_id variable:
var shape = fl.getDocumentDOM().selection[0];
var my_shape_id = shape.edges[0].id;
edge.isLine
Availability
Flash MX 2004.
Usage
edge.isLine
Description
Read-only property; an integer with a value of 0 or 1. A value of 1 indicates that the edge is a straight line. In that case,
the middle control point bisects the line joining the two end points.
Example
The following example determines whether the specified edge is a straight line and shows a value of 1 (it is a straight
line) or 0 (it isn’t a straight line) in the Output panel:
var shape = fl.getDocumentDOM().selection[0];
fl.trace(shape.edges[0].isLine);
Vedere la pagina 204
1 2 ... 200 201 202 203 204 205 206 207 208 209 210 ... 559 560

Commenti su questo manuale

Nessun commento