Announcement

Collapse
No announcement yet.

Flash: Ignoring Transparent Pixels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Flash: Ignoring Transparent Pixels

    I'm creating a series of skinned CLIK components and each uses textures with power-of-2 resolutions as suggested in the documentation.

    Most have surrounding transparent pixels as a result, but I only want the coloured pixels to be used in hit detections for mouse/overs, clicks, etc.

    I have found solutions for simple Flash buttons, but none that work for CLIK components. The Scaleform demos seem to rely on non-square textures to get around this.

    Is there a best practise for ignoring transparent pixels in hit checks? Or should I give in and resize my textures?

    #2
    In your CLIK component, create a new layer and add a new movieclip and give it the instance name "hitArea". Inside that movieclip you can specify a rectangle shape that decides the actual hit area.

    Comment


      #3
      Brilliant! That's exactly what I was looking for. Thanks a lot.

      Comment

      Working...
      X