Date: Fri, 20 Jun 1997 11:44:31 -0800 From: jdowdell@macromedia.com (John Dowdell) Subject: Re: moveable masks?Stephen Turbek wrote on June 19, "how would you make a moveable mask of an image? i.e. a moveable window to a picture that does not appear to move any ideas?"
The Director "mask" ink effect can be used here. If you apply this to a sprite then the 1-bit graphic member immediately following the sprite's graphic member in the Cast will mask out the sprite on Stage. These two members will be aligned by their regPoints.
Example: You drag a "thousands of colors" graphic to the Stage. The next castmember following this graphic is a black-and-white design. If you apply the "mask" ink effect to the sprite then you'll see the shape of the 1-bit graphic with the colors of the 16-bit graphic.
You can have the shape remain the same while changing the colors shown within that shape by: (a) moving the sprite's loc in the direction you wish while simultaneously (b) moving the masking member's regPoint in the opposite direction.
(If you move only the mask's regPoint then the sprite's position and colors on the screen will change... to move only the colors but not the shape you'd move the sprite and its mask in different directions.)
For an example of this see the Magnifying Glass movie on the Director 4 CDs (I think it's there)... it lets you drag a magnifying glass about, revealing different portions of a blown-up image, while the regular-sized image remains on the layer below. I don't know whether this example is available in the online repositories or not.
I'm working on a D6 library which will use this "animated masking" technique in two ways: to be able to drag a large map around within a smaller frame (masking to a rectangle), and to be able to steal animation information from the Score and apply it to a mask's regPoints (for effects such as searchlights, glimmers, streaks). Progress hasn't been as swift as I'd like because of machine breakdowns, email volume, and 4.0 browser and browser intercommunication study. I hope to have some drag'n'drop behaviors -- with modifiable scripts -- available for this use soon, though.
Summary: You can change the regPoint of a mask. Depending on the actual effect, you may wish to move the sprite's loc and its mask's regPoint in opposite directions.