Lingo Dictionary > O-R > pattern |  |

pattern

Syntax

    member(whichCastMember).pattern
    the pattern of member whichCastMember

Description

Cast member property; determines the pattern associated with the specified shape. Possible values are the numbers that correspond to the swatches in the Tools window's patterns palette. If the shape cast member is unfilled, the pattern is applied to the cast member's outer edge.

The Director player for Java can assign only the patterns for chips 1 and 15 in Director's patterns palette.

This property can be useful in Shockwave movies to change images by changing the tiling applied to a shape, allowing you to save memory required by larger bitmaps.

This property can be tested and set.

Example

The following statements make the shape cast member Target Area a filled shape and assign it pattern 1, which is a solid color:

    member("Target Area").filled = TRUE
    member("Target Area").pattern = 1

Example

This handler cycles through eight tiles, with each tile's number offset from the previous one, enabling you to create animation using smaller bitmaps:

    on exitFrame
    	currentPat = member("Background Shape").pattern
    	nextPat = 57 + ((currentPat - 56) mod 8)
    	member("Background Shape").pattern = nextPat
    	go the frame
    end