dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Can a movieclip have multiple masks?

  1. #1
    Senior Member
    Join Date
    Mar 2005
    Posts
    206

    Can a movieclip have multiple masks?

    It doesn't appear that I can do:

    mc.setMask(mask1);
    mc.setMask(mask2);
    mc.setMask(mask3);

    (the last mask is the only one that will work)

    I'm trying to create a kind of Venetian blinds effect...There is a grid of movieclips, each clip has a front and a back. At a mouse click, the front does a rotating card flip effect, and I want the backside of each clip to be a mask for a larger movieclip.

  2. #2
    Senior Member
    Join Date
    Nov 2005
    Location
    Milan
    Posts
    119
    You can't set multiple masks on a movie clip. Either put all the animation in one clip or set them one after another - ie. mask 1 animates, set mask 2, mask 2 animates etc.

  3. #3
    Member
    Join Date
    Oct 2005
    Location
    Santa Barbara, California, USA
    Posts
    61

    Sub Movies

    On a timeline I have solved this problem by making sub movies. So I make one mask on the movie timeline, then select other items to be masked and F8 them into a movie and mask that, and then select other items to mask and F8 them into a movie. When you play the main movie you have the equivalent of multiple masks. You can also mask groups of layers in the movie with individual masks, then group all those into one movie on the timeline, ad a layer and then mask that.

    I'm sure you could utilize this method using ActionScript.

  4. #4
    Senior Member
    Join Date
    Mar 2005
    Posts
    206
    Yeah, that sounds like a good solution. Would've liked mutliple clips on different layers doing this, but I can understand why that would be a problem runtime wise.

  5. #5
    Senior Member
    Join Date
    Mar 2005
    Posts
    206
    OK I have a question along the same lines. Let's say I create an empty movieclip, and then fill it up with a grid of small clips, so:

    maskClip = _root.createEmptyMovieClip("maskClip", 10);
    (for loop filling maskClip with other clips)

    stageClip.setMask(maskClip);

    What if I want to punch holes in maskClip to show only part of stageClip? It doesn't appear that this works:

    maskClip.childClip4._visible = false;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center