1 Reply Latest reply on Jan 9, 2009 2:00 AM by Kruc3fix

    button event with transparency

    Kruc3fix Level 1
      Hi people !
      This is my first thread. I searched google a lot but didn't found a reasonable sollution for what I need, so I'm thinking you could help me out.

      Here's a demo

      The problem is that even though the background of the image is transparent, the event is attacched to the entire image, instead to what's visible.

      Is there a property tht needs to be set to the SimpleButton object in order to make the event react only to non-transparent bitmap data ?
        • 1. Re: button event with transparency
          Kruc3fix Level 1
          I found the solution myself.

          In order to keep the mouse interaction only to the visible part of the button, you need to use swf images instead of png (jpg and gif doesn't work either; haven't tested with svg)

          The only difference to the code is new URLRequest("assets/region1on.swf") instead of ".png"

          To export swf images, you can use Illustrator > Save for Web and Devices > SWF