1 Reply Latest reply on Jul 14, 2008 12:13 AM by Culme

    Drop target below image or canvas seems impossible?

    Culme Level 1
      Hi All!
      I am building an app where the user can drag an image from one place, and drop it in a few different locations.

      The drop locations are vector images who listen for the dragEnter event, they get "highlighted" when an image is dragged onto them, and then accepts the dropped image - no problem. This all works like a charm.

      The trouble is I need to add a partially transparent PNG image on top of it all, and when I do that the image seems to consume any dragEnter events that are generated, and the "drop spots" below never get notified that something is being dragged over them.

      I realize that a PNG image with transparency will not be considered TRULY transparent, and that it normally does consume mouse events regardless of wether it's transparent or not. The odd thing is that you cannot work around this by setting mouseEnabled and mouseChildren to false on the image - it still sits there effectively blocking the dragEnter events from reaching their intended targets.

      If anyone has a workaround or solution to this I'd be very grateful!

      Thanks in advance & Best regards

        • 1. Re: Drop target below image or canvas seems impossible?
          Culme Level 1
          I had to give up on this one for now.

          I created a layer on top which contains the "drop targets", and a layer below the PNG image which contains the visual elements that get highlighted when stuff is dragged over the drop targets.

          It works, but it seems like a rather lousy solution.

          If anyone figures out a better way of doing it I'm still interested.