3 Replies Latest reply on Jan 9, 2007 5:43 PM by Newsgroup_User

    constraining or masking a sprite?? help plz

    bazza07
      I have a project and require a sprite only to be seen in half the stage..
      I have a rectangle shape in the middle of the stage and i want some of my sprites to only display when they are in the 'alpha' of this shape..
      Not sure if there is a simple way to do this or if each sprite needs some behaviours attached to it..
      Help would be very much appreciated

      Thanks Bazza
        • 1. Re: constraining or masking a sprite?? help plz
          Level 7
          You can use mask ink on the sprite and then draw a mask member to be
          used as the mask. Masks work differently in Director than in any other
          application. The mask is not placed on the stage, there is no mask
          sprite. The mask ink uses the member in the cast next to the sprite with
          mask ink. You can move the mask by changing its reg point.

          --
          Rob
          _______
          Rob Dillon
          Adobe Community Expert
          http://www.ddg-designs.com
          412-243-9119

          http://www.macromedia.com/software/trial/
          • 2. Re: constraining or masking a sprite?? help plz
            bazza07 Level 1
            ok i have done that but didnt really solve my problem..
            what i really need is some sort of bounding area where a sprite can move around in but as soon as it leaves that area on the stage is disappears??
            Thanks in advance
            • 3. Re: constraining or masking a sprite?? help plz
              Level 7
              The low tech way to handle a fixed mask would be to cut up a bitmap into
              below and above parts.

              If the below bitmap were on channel 1 with the above bitmap on channel
              10, then sprites 2 to 9 would be effectively masked by the channel 10
              bitmap, providing it's assigned bg trans ink.



              There is no built in universal masking mechanism. The alpha system
              built into Director allows a single bitmap member to have an alpha mask
              in the nexxt member over, to make an interactive moving mask some tricky
              lingo code that shifts the regPoint of the mask member is needed.



              If motion is controled by scripting, rather that the score, imaging
              lingo can be used to render a number of sprites to a composite image,
              using a common alpha mask.