Adobe Extending Flash Professional CS5 Instrukcja Użytkownika Strona 536

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 565
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 535
514
EXTENDING FLASH PROFESSIONAL
Vertex object
Last updated 5/2/2011
var shape = fl.getDocumentDOM().selection[0];
var hEdge = shape.edges[0].getHalfEdge(0);
var theVertex = hEdge.getVertex();
var someHEdge = theVertex.getHalfEdge(); // Not necessarily the same half edge
var theSameVertex = someHEdge.getVertex();
fl.trace('the same vertex: ' + theSameVertex);
vertex.setLocation()
Availability
Flash MX 2004.
Usage
vertex.setLocation(x, y)
Parameters
x A floating-point value that specifies the x coordinate of where the vertex should be positioned, in pixels.
y A floating-point value that specifies the y coordinate of where the vertex should be positioned, in pixels.
Returns
Nothing.
Description
Method; sets the location of the vertex. You must call shape.beginEdit() before using this method.
Example
The following example sets the vertex to the origin point:
var shape = fl.getDocumentDOM().selection[0];
shape.beginEdit();
var hEdge = shape.edges[0].getHalfEdge(0);
var vertex = hEdge.getVertex();
var someHEdge = vertex.getHalfEdge();
var vertex = someHEdge.getVertex();
// Move the vertex to the origin.
vertex.setLocation(0.0, 0.0);
shape.endEdit();
vertex.x
Availability
Flash MX 2004.
Usage
vertex.x
Przeglądanie stron 535
1 2 ... 531 532 533 534 535 536 537 538 539 540 541 ... 564 565

Komentarze do niniejszej Instrukcji

Brak uwag