See also
channel()
(Sound),
sprite()
Usage
-- Lingo syntax
sprite(nameOrNum)
// JavaScript syntax
sprite(nameOrNum);
Description
Top level function; returns a reference to a given sprite in the Score.
If the movie
scriptExecutionStyle
where no sprite with that name exists returns a reference to sprite 1. If the movie
scriptExecutionStyle
with that name exists returns
Parameters
Required. A string or integer that specifies the name or index position of the sprite.
nameOrNum
Example
This statement sets the variable
-- Lingo syntax
thisSprite = sprite("Cave")
// JavaScript syntax
var thisSprite = sprite("Cave");
See also
Sprite Channel
spriteSpaceToWorldSpace
Usage
sprite(whichSprite).camera.spriteSpaceToWorldSpace(loc)
sprite(whichSprite).camera(index).spriteSpaceToWorldSpace(loc)
Description
3D command; returns a world-space position that is found on the specified camera's projection
plane that corresponds to a location within the referenced sprite.
The projection plane is defined by the camera's X and Y axes, and is at a distance in front of the
camera such that one pixel represents one world unit of measurement. It is this projection plane
that is used for the sprite display on stage.
The
camera.spriteSpaceToWorldSpace()
camera(1).spriteSpaceToWorldSpace()
All cameras that are used by the referenced sprite will respond to the
command as if their display rect is the same size as the sprite.
Sound Channel
property is set to a value of 9, calling
property is set to a value of 10, calling
if called from Lingo or
VOID
to the sprite named Cave:
thisSprite
form of this command is a shortcut for using
.
sprite("foo")
sprite("foo")
if called from JavaScript.
undefined
spriteSpaceToWorldSpace
spriteSpaceToWorldSpace
where no sprite
545
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