Skip to main content
May 10, 2012
Question

How do I make a button conform to it's shape?

  • May 10, 2012
  • 1 reply
  • 694 views

I am making a map like file, the objects in this map have peculiar shapes. I have each section of the map as a .png file. One example of the shapes in the map is an L shaped area that wraps around another section of the map. I wish to make it so that the map is initially gray, when one rolls over a section it appears in color, and when you click on the areas a description box appears. the problem is when I make a button the button initially makes a rectangular box where the transparency layer for the .png is and ends up causing overlapping. So how can I conform this mask like button?

This topic has been closed for replies.

1 reply

_spoboyle
Inspiring
May 10, 2012

you'll have to use vectors rather than bitmaps.

or

if you are using sprites you use a vector with alpha 0 and add the listener to the vector rather than the bitmap.

or if you are using simpleButtons use the vector of teh correct shape to the hitTestState