MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 519

Extending flash
Table of Contents

Advertisement

Description
Method; gets a
HalfEdge object
Example
The following example shows how to get other half edges that share the same vertex.
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
A floating-point value that specifies the x coordinate of where the vertex should be
x
positioned, in pixels.
A floating-point value that specifies the y coordinate of where the vertex should be
y
positioned, in pixels.
Returns
Nothing.
Description
Method; sets the location of the vertex. You must call
method.
Example
The following example sets the vertex to the origin point.
var shape = fl.getDocumentDOM().selection[0];
var hEdge = shape.edges[0].getHalfEdge(0);
var vertex = hEdge.getVertex();
// Move the vertex to the origin.
vertex.setLocation(0.0, 0.0);
that shares this vertex.
shape.beginEdit()
before using this
Vertex object
519

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents