EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 724

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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