0 Replies Latest reply on Nov 11, 2007 3:35 PM by CRF450R

    Thorny Masking Issue for a Newbie

    CRF450R
      I'm trying to create a mask with a customized shape, meaning, not one you can draw in code. I have an image of that shape in a Photoshop file. The outside of the image is gray and the center is transparent (imagine a transparent star in the center of a gray field and you have the idea).

      What I need to do is permit the user to drag another image onto a canvas that has this outline shape/image on it. It the user attempts to drop the image on the gray border, I want nothing to happen, meaning I want the drop to "fail." However, if the user drops the image on the center, transparent portion of the image, I want the drop to succeed.

      Additionally (and this is the tough part), if the user drops the incoming image right on the border of the transparent center and the gray outside, I want the portion of the dropped image in the transparent section to show, but I want the gray to cover over the remainder of it.

      I read a few things dealing with alpha channels in Photoshop and how they can be used to create a mask, but I'm not having any luck. It seems to me what I REALLY need is an image that has an ABSENT center, not a transparent center. I can then put the drop listener on the canvas beneath. Does anyone know how to create such a thing?