MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 1077

Director scripting reference
Table of Contents

Advertisement

// JavaScript syntax
member("Archie").vertex[2].handle1 = point(-63.0000, -16.0000);
See also
vertexList
vertexList
Usage
-- Lingo syntax
memberObjRef.vertexList
// JavaScript syntax
memberObjRef.vertexList;
Description
Cast member property; returns a linear list containing property lists, one for each vertex of a
vector shape. The property list contains the location of the vertex and the control handle. There
are no control handles if the location is (0,0).
Each vertex can have two control handles that determine the curve between this vertex and the
adjacent vertices. In
relative to that vertex, rather than absolute in the coordinate system of the shape. If the first
control handle of a vertex is located 10 pixels to the left of that vertex, its location is stored as
(-10, 0). Thus, when the location of a vertex is changed with Lingo, the control handles move
with the vertex and do not need to be updated (unless the user specifically wants to change the
location or size of the handle).
When modifying this property, be aware that you must reset the list contents after changing any
of the values. This is because when you set a variable to the value of the property, you are placing
a copy of the list, not the list itself, in the variable. To effect a change, use code like this:
- Get the current property contents
currVertList = member(1).vertexList
-- Add 25 pixels to the horizontal and vertical positions of the first vertex
in the list
currVertList[1] .vertex = currVertList[1] .vertex + point(25, 25)
-- Reset the actual property to the newly computed position
member(1).vertexList = currVertList
Example
This statement displays the
-- Lingo syntax
put(member("Archie").vertexList)
-- [[#vertex: point(-66.0000, 37.0000), \
#handle1: point(-70.0000, -36.0000), \
#handle2: point(-62.0000, 110.0000)], [#vertex: point(66.0000, -5.0000), \
#handle1: point(121.0000, 56.0000), #handle2: point(11.0000, -66.0000)]]
// JavaScript syntax
put(member("Archie").vertexList);
//[[#vertex: point(-66.0000, 37.0000), #handle1: point(-70.0000, -36.0000),
#handle2: point(-62.0000, 110.0000)], [#vertex: point(66.0000, -5.0000),
#handle1: point(121.0000, 56.0000), #handle2: point(11.0000, -66.0000)]]
, the coordinates of the control handles for a vertex are kept
vertexList
vertextList
value for an arched line with two vertices:
vertexList 1077

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Director mx 2004

Table of Contents