Extending Flash |
|
|
|
| Objects > Vertex object > vertex.setLocation() | |||
Flash MX 2004.
vertex.setLocation(x,y)
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.
Nothing.
Method; sets the location of the vertex. You must call shape.beginEdit() before using this method.
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();
|
|
|
|