User Guide
Chapter 3174
curve
Syntax
member.curve[curveListIndex]
Description
This property contains the vertexList of an individual curve (shape) from a vector shape cast
member. You can use the curve property along with the vertex property to get individual vertices
of a specific curve in a vector shape.
A
vertexList is a list of vertices, and each vertex is a property list containing up to three
properties: a #vertex property with the location of the vertex, a #handle1 property with the
location of the first control point for that vertex, and a #handle2 property with the location of the
second control point for that vertex. See
vertexList.
Examples
This statement displays the list of vertices of the third curve of vector shape member
SimpleCurves:
put member("SimpleCurves").curve[3]
-- [[#vertex: point(113.0000, 40.0000), #handle1: point(32.0000, 10.0000),
#handle2: point(-32.0000, -10.0000)], [#vertex: point(164.0000, 56.0000)]]
This statement moves the first vertex of the first curve in a vector shape down and to the right by
10 pixels:
member(1).curve[1].vertex[1] = member(1).curve[1].vertex[1] + point(10, 10)
The following code moves a sprite to the location of the first vertex of the first curve in a vector
shape. The vector shape’s
originMode must be set to #topLeft for this to work.
vertexLoc = member(1).curve[1].vertex[1]
spriteLoc = mapMemberToStage(sprite(3), vertexLoc)
sprite(7).loc = spriteLoc
vertex, vertexList
date() (system clock)
Syntax
the abbr date
the abbrev date
the abbreviated date
the date
the long date
the short date
Description
Function; returns the current date in the system clock in one of three formats: abbreviated,
long, or short (default). The abbreviated format can also be referred to as abbrev and abbr.
In Java, the
date function is available, but it doesn’t accept abbrev, long, or short modifiers.
When the movie plays back as an applet, the date’s format is
MM/DD/YY, where MM represents the
month,
DD represents the day, and YY represents the last two digits of the current year. For the
months January through September, the value for
MM is a single digit.