578
Chapter 12: Methods
vector()
Usage
-- Lingo syntax
vector()
vector(
intX
,
intY
,
intZ
)
// JavaScript syntax
vector();
vector(
intX
,
intY
,
intZ
);
Description
Top level function and data type. Describes a point in 3D space according to three parameters,
which are the specific distances from the reference point along the
x
-axis,
y
-axis, and
z
-axis,
respectively.
If the vector is in world space, the reference point is the world origin,
vector(0, 0, 0)
. If the
vector is in object space, the reference point is the object’s position and orientation.
This method returns a vector object.
Vector values can be operated upon by the
+
,
-
,
*
and
/
operators. See their individual definitions
for more information.
Parameters
intX
Optional. An integer that specifies the
x
-axis point.
intY
Optional. An integer that specifies the
y
-axis point.
intZ
Optional. An integer that specifies the
z
-axis point.
Example
This statement creates a vector and assigns it to the variable
myVector
:
-- Lingo syntax
myVector = vector(10.0, -5.0, 0.0)
// JavaScript syntax
var myVector = vector(10.0, -5.0, 0.0);
In Lingo only, this statement adds two vectors and assigns the resulting value to the
variable
thisVector
:
-- Lingo syntax
thisVector = vector(1.0, 0.0, 0.0) + vector(0.0, -12.5, 2.0)
version()
Usage
-- Lingo syntax
fileioObjRef
.version()
// JavaScript syntax
fileioObjRef
.version();
Description
Fileio method; Displays the Fileio version and build information in the Message window.
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...