8 Replies Latest reply on Aug 30, 2007 8:27 PM by James Newton, ACP

    Animated Mask

      In a Director movie, there is this animated scroll that pulls down and up as the user navigates through the movie. I want this scroll to become the mask, but have the mask dynamic so when it scrolls down, it generates the mask. Also, when it scrolls back up, the mask is just at the top. Any way to tackle this? Or are you just left with static masks in Director?

      Thanks in advance,
        • 1. Re: Animated Mask
          James Newton, ACP Level 3
          What kind of "movie" are you referring to: a QuickTime video or a Director movie? Can you post a URL to a series of images which shows how the animated scroll and mask feature should work?
          • 2. Re: Animated Mask
            askmrkelly Level 1
            It's a regular Director Movie. I can post the file on Monday.
            • 4. Animated Mask
              James Newton, ACP Level 3
              I'm still not entirely sure what you are asking. Currently, as the scroll moves up and down, the buttons on it disappear then reappear. I think that you want:

              * the scroll to hide the buttons progressively as it rolls up
              * a new set of (hidden) buttons to be swapped in
              * the scroll to reveal the new buttons at it rolls down.

              One technique would be to place the buttons in a film loop, then set the .crop property of the film loop member to TRUE. You can then modify the rect of the film loop sprite, and mask or unmask the buttons. This is not entirely straightforward:

              * The regPoint of a film loop is always at its centre. As you reduce the height pixel by pixel, the regPoint will shift, making the top of the sprite move up and down by one pixel. You will need to adjust for this.
              * Behaviors attached to a sprite inside a film loop will react to mouse clicks, but not to frame events.
              * If you want to change the property of an internal sprite, you will have to use the "tell sprite" command

              Is my interpretation correct?
              • 5. Re: Animated Mask
                askmrkelly Level 1
                No, I simply want to create a mask the shape of the scroll, but that mask to be animated as I navigate through the movie. As it is now, I have all the content contained in the scroll with a yellow background. I can create a mask the same dimensions as the scroll, but when I navigate through the movie the scroll moves up and down. I want the actually mask to do the same besides staying static like it does when I apply the mask.
                • 6. Re: Animated Mask
                  James Newton, ACP Level 3
                  Could you provide a series of images that show how the Stage is to look as the scroll moves up and down. That would help me to visualize what you mean.
                  • 7. Re: Animated Mask
                    askmrkelly Level 1
                    I should of specified these masks are for the display template. Here are the examples of the exe that are to be generated. When I navigate, I want these displays masks to be animated.

                    The other would have the extension of scrollCollapse.exe

                    • 8. Re: Animated Mask
                      James Newton, ACP Level 3
                      Here's what I did:
                      1) I created a series of 1-bit bitmaps of varying heights
                      2) I selected all the bitmap members and selected Modify | Cast to Time. This placed all the members in order in the same sprite channel in consecutive frames, as a single sprite span.
                      3) I selected the sprite then Right-Clicked / Ctrl-Clicked on it to bring up the contextual member
                      4) I selected Script... in the contextual menu
                      5) I replaced the default scriptText with:

                      on prepareFrame(me)
                      vMember = sprite(me.spriteNum).member
                      (the activeWindow).appearanceOptions.mask = vMember

                      6) I saved the movie and published it as a projector, with the Loop option at the bottom of the Files tab checked.
                      7) I launched the projector.

                      The projector resized dynamically as it played.

                      Is this what you are looking for?