
621
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()
form of this command is a shortcut for using
camera(1).spriteSpaceToWorldSpace()
.
All cameras that are used by the referenced sprite will respond to the
spriteSpaceToWorldSpace
command as if their display rect is the same size as the sprite.
Example
This statement shows that the point (50, 50) within sprite 5 is equivalent to the vector (-
1993.6699, 52.0773, 2263.7446) on the projection plane of the camera of sprite 5:
put sprite(5).camera.spriteSpaceToWorldSpace(point(50, 50))
-- vector(-1993.6699, 52.0773, 2263.7446)
See also
worldSpaceToSpriteSpace
,
rect (camera)
,
camera
sqrt()
Syntax
sqrt(
number
)
the sqrt of
number
Description
Math function; returns the square root of the number specified by
number,
which is either a
floating-point number or an integer rounded to the nearest integer.
The value must be a decimal number greater than 0. Negative values return 0.
Examples
This statement displays the square root of 3.0 in the Message window:
put sqrt(3.0)
-- 1.7321
This statement displays the square root of 3 in the Message window:
put sqrt(3)
-- 2
See also
floatPrecision
stage
Syntax
the stage
Description
System property; refers to the main movie.
This property is useful when using the
tell
command to send a message to the main movie from
a child movie.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...