User Guide
474
perpendicularTo
Syntax
vector1.perpendicularTo(vector2)
Description
3D vector command; returns a vector perpendicular to both the original vector and a second
vector (vector2). This command is equivalent to the vector crossProduct command. See
crossProduct().
Example
In this example, pos1 is a vector on the x axis and pos2 is a vector on the y axis. The value
returned by
pos1.perpendicularTo(pos2) is vector( 0.0000, 0.0000, 1.00000e4 ). The
last two lines of the example show the vector which is perpendicular to both pos1 and pos2.
pos1 = vector(100, 0, 0)
pos2 = vector(0, 100, 0)
put pos1.perpendicularTo(pos2)
-- vector( 0.0000, 0.0000, 1.00000e4 )
See also
crossProduct(), cross
persistent
Syntax
timeoutObject.persistent
Description
Object property; determines whether the given timeoutObject is removed from the
timeoutList
when the current movie stops playing. If TRUE, timeoutObject remains active. If
FALSE, the timeout object is deleted when the movie stops playing. The default value is FALSE.
Setting this property to TRUE allows a timeout object to continue generating timeout events in other
movies. This is useful when one movie branches to another with the
go to movie command.
Example
This prepareMovie handler creates a timeout object that will remain active after the declaring
movie stops playing:
on prepareMovie
-- Make a timeout object that sends an event every 60 minutes.
timeout("reminder").new(1000 * 60 * 60, #handleReminder)
timeout("reminder").persistent = TRUE
end
See also
name (timeout property), period, target, time (timeout object property), timeout(),
timeoutHandler, timeoutList