User Guide
364
For best results, set a QuickTime cast member’s mask property before any of its sprites appear on
the Stage in the
on beginSprite event handler. Setting or changing the mask property while the
cast member is on the Stage can have unpredictable results (for example, the mask may appear as
a freeze frame of the digital video at the moment the
mask property took effect).
Masking is an advanced feature; you may need to experiment to achieve your goal.
This property can be tested and set. To remove a mask, set the
mask property to 0.
Example
This frame script sets a mask for a QuickTime sprite before Director begins to draw the frame:
on prepareFrame
member("Peeping Tom").mask = member("Keyhole")
end
See also
invertMask
max()
Syntax
list.max()
max(list)
max(value1, value2, value3, ...)
Description
Function; returns the highest value in the specified list or the highest of a given series of values.
The max function also works with ASCII characters, similar to the way < and > operators work
with strings.
Example
The following handler assigns the variable Winner the maximum value in the list Bids, which
consists of [#Castle:600, #Schmitz:750, #Wang:230]. The result is then inserted into the content
of the field cast member Congratulations.
on findWinner Bids
Winner = Bids.max()
member("Congratulations").text = \
"You have won, with a bid of $" & Winner &"!"
end
maxInteger
Syntax
the maxInteger
Description
System property; returns the largest whole number that is supported by the system. On most
personal computers, this is 2,147,483,647 (2 to the thirty-first power, minus 1).
This property can be useful for initializing boundary variables before a loop or for limit testing.
To use numbers larger than the range of addressable integers, use floating-point numbers instead.
They aren’t processed as quickly as integers, but they support a greater range of values.