726
Chapter 14: Properties
Example
This statement sets the
decayMode
property of the fog of the camera Defaultview to
#linear
. If
the fog’s
enabled
property is set to
TRUE
, the density of the fog will steadily increase between the
distances set by the fog’s
near
and
far
properties. If the
near
property is set to 100 and the
far
property is set to 1000, the fog will begin 100 world units in front of the camera and gradually
increase in density to a distance of 1000 world units in front of the camera.
member("3d world").camera("Defaultview").fog.decayMode = #linear
See also
fog
,
near (fog)
,
far (fog)
,
enabled (fog)
defaultRect
Usage
-- Lingo syntax
memberObjRef.
defaultRect
// JavaScript syntax
memberObjRef.
defaultRect;
Description
Cast member property; controls the default size used for all new sprites created from a Flash
movie or vector shape cast member. The
defaultRect
setting also applies to all existing sprites
that have not been stretched on the Stage. You specify the property values as a Director rectangle;
for example, rect(0,0,32,32).
The
defaultRect
member property is affected by the cast member’s
defaultRectMode
member
property. The
defaultRectMode
property is always set to
#Flash
when a movie is inserted into a
cast, which means the original
defaultRect
setting is always the size of the movie as it was
originally created in Flash. Setting
defaultRect
after that implicitly changes the cast member’s
defaultRectMode
property to
#fixed
.
This property can be tested and set.
Example
This handler accepts a cast reference and a rectangle as parameters. It then searches the specified
cast for Flash cast members and sets their
defaultRect
property to the specified rectangle.
-- Lingo syntax
on setDefaultFlashRect(whichCast, whichRect)
repeat with i = 1 to castLib(whichCast).member.count
if member(i, whichCast).type = #flash then
member(i, whichCast).defaultRect = whichRect
end if
end repeat
end
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...