3 Replies Latest reply on May 10, 2006 12:22 PM by Newsgroup_User

    creating a spotlight in director

    Level 7
      how can i make an effect like a spotlight in director?
      like in this flash example :
      http://www.adobe.com/support/flash/drawing/creating_masks/creating_masks03.html


        • 1. Re: creating a spotlight in director
          Lukewig Level 1
          Hi,

          Using imaging lingo - you can 'paint' a hole into an image's alpha channel to reveal whats below it. For example, sprite 1 might contain the fully lit version of the image, and sprite 2 (which covers sprite 1) has the dark version. You could paint into the alpha channel of the image of sprite 2 to reveal the sprite below (see http://www.lingoworkshop.com/Examples/Alpha_Scratch.php for an example). Alternatively, you could paint a 'portion' of the lit image into the darked one using a shape as the mask for the copyPixel command. Check out the 'stencil' behaviours or paintbox behaviours that are either in the 'library palette' or possiblely at nonlinear.openspark.com.

          -- Luke
          • 2. Script making Director's mask ink work
            Level 7
            You can also use a mask technique in Director, though it doesn't do
            score animated masks analogous to Flash's. A the bottom there's a
            behavio r that makes it quite easy to have a spot follow the mouse.

            When mask ink is assigne a director bitmap sprite, the next member over
            to the one on the stage acts as it's mask, bear in mind the mask member
            is not placed in the score. The mask causes the ilimunated looking copy
            of the picture to show only wher ethe mask is positioned. The dim
            version in a lower sprite channel shows everyewwhere else.

            The roundabout diector scheme to move the mask is to change the regpoint
            of the mask member.

            Again if a sprie is assigned bitmap member
            #4 with mask ink, then the only visible parts of the member is where non
            white art of member #5 intersect member #4 ( swictching between them in
            paint window or activating the onion skin paint window option reveals
            the mask intersection.

            Here's a briefly tested behavior that makes a bitmap's mask follow the
            mouse.


            -- attached to a bitmap sprite assigned Mask ink

            property maskMember, maskCenter, mySprite

            on beginSprite me
            mySprite = sprite(me.spriteNum)
            maskMember = mySprite.memberNum + 1
            maskCenter = point(member(maskMember).width / 2,
            member(maskMember).height / 2) + mySprite.member.regpoint
            end

            on mouseWithin me -- gets periodicly called when mouse is over
            mouseOffset = the mouseLoc - point(mySprite.left, mySprite.top)
            member(maskMember).regpoint = maskCenter - mouseOffset
            end


            you may need to add a mouseLeave handler that perhaps moves the mask
            regpoin way off in left field so there's no spot when not over.
            • 3. Re: Script making Director's mask ink work
              Level 7
              i am trying to do as u wrote
              but i am missing something
              which in to use execlly on which sprite ???
              maybe u can put a dir to d/l from somewhere?
              "JB" <lingoguy@sbcglobal.net> wrote in message
              news:lingoguy-6920E1.02591306052006@forums.macromedia.com...
              > You can also use a mask technique in Director, though it doesn't do
              > score animated masks analogous to Flash's. A the bottom there's a
              > behavio r that makes it quite easy to have a spot follow the mouse.
              >
              > When mask ink is assigne a director bitmap sprite, the next member over
              > to the one on the stage acts as it's mask, bear in mind the mask member
              > is not placed in the score. The mask causes the ilimunated looking copy
              > of the picture to show only wher ethe mask is positioned. The dim
              > version in a lower sprite channel shows everyewwhere else.
              >
              > The roundabout diector scheme to move the mask is to change the regpoint
              > of the mask member.
              >
              > Again if a sprie is assigned bitmap member
              > #4 with mask ink, then the only visible parts of the member is where non
              > white art of member #5 intersect member #4 ( swictching between them in
              > paint window or activating the onion skin paint window option reveals
              > the mask intersection.
              >
              > Here's a briefly tested behavior that makes a bitmap's mask follow the
              > mouse.
              >
              >
              > -- attached to a bitmap sprite assigned Mask ink
              >
              > property maskMember, maskCenter, mySprite
              >
              > on beginSprite me
              > mySprite = sprite(me.spriteNum)
              > maskMember = mySprite.memberNum + 1
              > maskCenter = point(member(maskMember).width / 2,
              > member(maskMember).height / 2) + mySprite.member.regpoint
              > end
              >
              > on mouseWithin me -- gets periodicly called when mouse is over
              > mouseOffset = the mouseLoc - point(mySprite.left, mySprite.top)
              > member(maskMember).regpoint = maskCenter - mouseOffset
              > end
              >
              >
              > you may need to add a mouseLeave handler that perhaps moves the mask
              > regpoin way off in left field so there's no spot when not over.