User Guide
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