Controlling vector shapes with Lingo or JavaScript syntax
You can use script to modify a vector shape by setting properties and using methods related to the
shape's vertices. For more information about the following properties, expressions, and methods,
see the Scripting Reference topics in the Director Help Panel.
•
To display a list that contains the location of each vertex and control handle in a vector shape,
test the
vertexList
•
To access a vertex directly, use the
•
To add or delete a vertex, use the
•
To move a vertex or a vertex handle, use the
•
To display the vertex list for a vector shape, test the
•
To add a new shape to the vector shape, use the
•
To display or specify the registration point for the vector shape's cast member, test or set the
regPointVertex
•
To display or specify the point around which a vector shape scales and rotates, test or set the
property.
originMode
Setting vector shape properties
You can use the Property inspector to view and change settings for selected vector shape cast
members. In addition to setting standard name and unload properties, you can specify anti-
aliasing based on system performance and how the shape fits within the bounding rectangle.
To view or change vector shape cast member properties:
Select a vector shape cast member and click the Member tab on the Property inspector.
1
To specify how Director removes the cast member from memory if memory is low, be sure
2
you're in Graphical view and select an option from the Unload pop-up menu. For more
information, see
To set specific vector shape settings, click the Vector tab.
3
To set the stroke color, choose a color from the Color menu, or enter a color value in the Stroke
4
Color text box.
To set the width of the stroke, use the Width slider.
5
To set the fill color, select a color from the Color menu, or enter a color value in the Fill Color
6
text box.
To set the type of fill, select one of these three options: No Fill, Solid, or Gradient.
7
To change the setting for anti-aliasing, click Anti-alias.
8
A check mark indicates that Anti-alias is on.
142
Chapter 6: Vector Shapes
property.
vertex
addVertex()
property.
"Controlling cast member unloading" on page
chunk expression.
or
deleteVertex()
or
moveVertex()
moveVertexHandle()
property.
curve
method.
newCurve()
47.
method.
method.
Need help?
Do you have a question about the DIRECTOR MX 2004-USING DIRECTOR and is the answer not in the manual?