Lingo Dictionary > D-F > defaultRectMode |
![]() ![]() ![]() |
defaultRectMode
Syntax
member(
whichVectorOrFlashMember
)
.
defaultRectMode
the defaultRectMode of member
whichVectorOrFlashMember
Description
Cast member property; controls how the default size is set for all new sprites created from Flash movie or vector shape cast members. You specify the property value as a Director rectangle; for example, rect(0,0,32,32).
The defaultRectMode
property does not set the actual size of a Flash movie's default rectangle; it only determines how the default rectangle is set. The defaultRectMode
member property can have these values:
![]() |
|
![]() |
|
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, sets their defaultRectMode
property to #fixed
, and then sets their defaultRect
property to rect(0,0,320,240).
on setDefaultRectSize whichCast repeat with i = 1 to the number of members of castLib whichCast if member(i, whichCast).type = #flash then member(i, whichCast).defaultRectMode = #fixed member(i, whichCast).defaultRect = rect(0,0,320,240) end if end repeat end
See also
![]() ![]() ![]() |