778
Chapter 14: Properties
floatPrecision
Usage
the floatPrecision
Description
Movie property; rounds off the display of floating-point numbers to the number of decimal places
specified. The value of
floatPrecision
must be an integer. The maximum value is 15
significant digits; the default value is 4.
The
floatPrecision
property determines only the number of digits used to display
floating-point numbers; it does not change the number of digits used to perform calculations.
•
If
floatPrecision
is a number from 1 to 15, floating-point numbers display that number of
digits after the decimal point. Trailing zeros remain.
•
If
floatPrecision
is zero, floating-point numbers are rounded to the nearest integer. No
decimal points appear.
•
If
floatPrecision
is a negative number, floating-point numbers are rounded to the absolute
value for the number of decimal places. Trailing zeros are dropped.
This property can be tested and set.
Example
This statement rounds off the square root of 3.0 to three decimal places:
the floatPrecision = 3
x = sqrt(3.0)
put x
-- 1.732
This statement rounds off the square root of 3.0 to eight decimal places:
the floatPrecision = 8
put x
-- 1.73205081
fog
Usage
member(
whichCastmember
).camera(
whichCamera
).fog.color
sprite(
whichSprite
).camera{(
index
)}.fog.color
member(
whichCastmember
).camera(
whichCamera
).fog.decayMode
sprite(
whichSprite
).camera{(
index
)}.fog.decayMode
member(
whichCastmember
).camera(
whichCamera
).fog.enabled
sprite(
whichSprite
).camera{(
index
)}.fog.enabled
member(
whichCastmember
).camera(
whichCamera
).fog.far
sprite(
whichSprite
).camera{(
index
)}.fog.far
member(
whichCastmember
).camera(
whichCamera
).fog.near
sprite(
whichSprite
).camera{(
index
)}.fog.near
Description
3D camera property; fog introduces a coloring and blurring of models that increases with distance
from the camera. The effect is similar to real fog, except that it can be any color.
See also
color (fog)
,
decayMode
,
enabled (fog)
,
far (fog)
,
near (fog)
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...