MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 491

Director scripting reference
Table of Contents

Advertisement

Example
These statements create and display two randomly defined unit vectors in the Message window:
-- Lingo syntax
vec1 = randomVector()
vec2 = randomVector()
put(vec1 & RETURN & vec2)
// JavaScript syntax
var vec1 = randomVector();
var vec2 = randomVector();
put(vec1 + "\n" + vec2);
See also
vector()
randomVector
Usage
randomVector()
Description
3D command; returns a unit vector describing a randomly chosen point on the surface of a unit
sphere. This method differs from
random(10)/10.0)
Parameters
None.
Example
These statements create and display two randomly defined unit vectors in the Message window:
vec = randomVector()
put vec
-- vector(-0.1155, 0.9833, -0.1408)
vec2 = randomVector()
put vec2
-- vector(0.0042, 0.8767, 0.4810)
See also
getNormalized, generateNormals(),
rawNew()
Usage
parentScript.rawNew()
rawNew(parentScript)
Description
Function; creates a child object from a parent script without calling its
allows a movie to create child objects without initializing the properties of those child objects.
This is particularly useful when you want to create large numbers of child objects for later use. To
initialize the properties of one of these raw child objects, call its
vector( random(10)/10.0, random(10)/10.0,
, in that the resulting vector is guaranteed to be a unit vector.
normalize
on new
handler. This
on new
handler.
rawNew()
491

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents