Syntax: |
the defaultRectMode of member whichFlashMember |
Type: |
Cast member property |
Description: |
This property controls how the default size is set for all new sprites created from a Flash movie cast member. You specify the property value as a Director rect; for example, rect(0,0,32,32). |
|
The defaultRectMode property does not set the actual size of a Flash movie's default
rect; it only determines how the default rect is set. The defaultRectMode of member
property can have these values:
|
|
 |
#Flash Set the default rect using the size of the movie as it was originally
created in Flash.
|
 |
#fixed Set the default rect using the fixed size specified by the defaultRect of
member property.
|
|
|
The defaultRect of member property is affected by the cast member's defaultRectMode
of 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 the defaultRect
property after that implicitly changes the cast member's defaultRectMode property
to #fixed .
|
|
The defaultRectMode of member property can be tested and set. The default setting
is #flash .
|
Example: |
This handler accepts a cast reference and a rect 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 the type of member i of castLib whichCast = #flash then
set the defaultRectMode of member i = #fixed
set the defaultRect of member i = rect(0,0,320,240)
end if
end repeat
end
|
Related Lingo: |
FlashRect of member property, defaultRect of member property |
 |
|