MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 546

Director scripting reference
Table of Contents

Advertisement

Parameters
Required. Specifies the location in the referenced sprite. This location should be a point
loc
relative to the sprite's upper-left corner.
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,
sqrt()
Usage
sqrt(number)
the sqrt of number
Description
Math function (Lingo only); returns the square root of a specified number.
The value must be a decimal number greater than 0. Negative values return 0.
In JavaScript syntax, use the Math object's
Parameters
Required. Specifies the number. This number is either a floating-point number or an
number
integer rounded to the nearest integer.
Example
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
546
Chapter 12: Methods
rect
(camera),
camera
function.
sqrt()

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

This manual is also suitable for:

Director mx 2004

Table of Contents