1 Reply Latest reply on May 17, 2006 9:01 AM by Rothrock

    Load PNG and set the hitzone not in the transparent part

    Nixy Level 1
      When we create button or movieClip with press event (like button), we have to set the hitzone. By default all the image represent this zone. When can set a mask and the zone is just the part. The problem is that I load PNH that is a picture of someone. All around is completely transparent. I don't waht the transparent zone to be enabled. Just like if I had a mask in my clip or button.

      Any idea how to do it
      Tanx in advanced
        • 1. Re: Load PNG and set the hitzone not in the transparent part
          Rothrock Level 5
          Nope it can't be done like that.

          Since you are using Flash8 you can load the PNG, set the "hit" area to the whole area, and when a hit occurs use the bitmap class to check the "color" of the pixel that was clicked. If it was transparent ignore the clip otherwise do whatever you wanted for the click.

          I'm sure I'm missing a step or two in there. I don't have Flash8 so I've not done this myself. Search the forums this has come up in the past week and others have answered it as well.