Lingo Dictionary > L-N > mask

 

mask

Syntax

member(whichQuickTimeMember).mask
the mask of member whichQuickTimeMember

Description

Cast member property; specifies a black-and-white (1-bit) cast member to be used as a mask for media rendered direct to Stage with media appearing in the areas where the mask's pixels are black. The mask property lets you benefit from the performance advantages of a direct-to-Stage digital video while playing a QuickTime movie in a nonrectangular area. The mask property has no effect on non-direct-to-Stage cast members.

Director always aligns the registration point of the mask cast member with the upper left of the QuickTime movie sprite. Be sure to reset the registration point of a bitmap to the upper left corner, as it defaults to the center. The registration point of the QuickTime member cannot be reset from the upper left corner. The mask cast member can't be moved and is not affected by the center and crop properties of its associated cast member.

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