User Guide

348 Chapter 12: Methods
Example
This statement shows the world-relative transform of the model named Box, followed by its
position and rotation properties:
put member("3d world").model("Box").getworldTransform()
-- transform(1.000000,0.000000,0.000000,0.000000, \
0.000000,1.000000,0.000000,0.000000, \
0.000000,0.000000,1.000000,0.000000, - \
94.144844,119.012825,0.000000,1.000000)
put member("3d world").model("Box"). getworldTransform().position
-- vector(-94.1448, 119.0128, 0.0000)
put member("3d world").model("Box"). getworldTransform().rotation
--vector(0.0000, 0.0000, 0.0000)
See also
worldPosition, transform (property)
go()
Usage
-- Lingo syntax
_movie.go(frameNameOrNum {, movieName})
// JavaScript syntax
_movie.go(frameNameOrNum {, movieName});
Description
Movie method; causes the playhead to branch to a specified frame in a specified movie.
This method can be used to tell the playhead to loop to the previous marker, and is a convenient
means of keeping the playhead in the same section of the movie while script remains active.
It is best to use marker labels for
frameNameOrNum instead of frame numbers; editing a movie can
cause frame numbers to change. Using marker labels also makes it easier to read scripts.
Calling
go() with the movieName parameter loads frame 1 of the movie. If go() is called from
within a handler, the handler in which it is placed continues executing. To suspend the handler
while playing the movie, use the
play() method, which may be followed by a subsequent call to
playDone() to return.
When you specify a movie to play, specify its path if the movie is in a different folder, but to
prevent a potential load failure, dont include the movies .dir, .dxr, or .dcr file extension.
To more efficiently go to a movie at a URL, use the
downloadNetThing() method to download
the movie file to a local disk first, and then use the go() method with the movieName parameter
to go to that movie on the local disk.
The
goLoop() method sends the playhead to the previous marker in a movie, which is a
convenient means of keeping the playhead in the same section of the movie while Lingo or
JavaScript syntax remains active.
The following are reset when a movie is loaded:
beepOn and constraint properties;
keyDownScript, mouseDownScript, and mouseUpScript; cursor and immediate sprite
properties; cursor() and puppetSprite() methods; and custom menus. However, the
timeoutScript is not reset when loading a movie.