724
Chapter 14: Properties
Example
This statement displays a sample list of vertices of the third curve of vector shape member
SimpleCurves:
-- Lingo syntax
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)]]
// JavaScript syntax
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:
-- Lingo syntax
member(1).curve[1].vertex[1] = member(1).curve[1].vertex[1] + point(10, 10)
// JavaScript syntax
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.
-- Lingo syntax
vertexLoc = member(1).curve[1].vertex[1]
spriteLoc = mapMemberToStage(sprite(3), vertexLoc)
sprite(7).loc = spriteLoc
// JavaScript syntax
var vertexLoc = member(1).curve[1].vertex[1];
var spriteLoc = mapMemberToStage(sprite(3), vertexLoc);
sprite(7).loc = spriteLoc;
debug
Usage
member(
whichCastmember
).model(
whichModel
).debug
Description
3D model property; indicates whether the bounding sphere and local axes of the model
are displayed.
Example
This statement sets the
debug
property of the model Dog to
TRUE
.
member("ParkScene").model("Dog").debug = TRUE
See also
boundingSphere
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...