Search code examples
flashapache-flexflash-builderflex4.5flashcatalyst

How to create a button in flash catalyst with irregular edges


I am using Photoshop, Flash Catalyst and Flash Builder together to develop a flash application. The artwork is provided in an Photoshop file with one image in each layer. Each of these images are irregular and must be converted into buttons.

The problem is, when I create a button in Catalyst, a rectangular area surrounding the actual artwork becomes the target area of the button. I wish to have just the artwork as the target area. The images that were imported from Photoshop has a transparent background. Is there a technique to have the irregular artwork shape as my actual target area?


Solution

  • The trick is to use vector masks in Photoshop. Each layer that contains a piece of artwork must also be masked using a vector mask. Hence the question is reduced to how to create a vector mask for a given selection. It can be done by first creating a work path from the current selection and then converting that path to a vector mask.

    The rest of the process remains same i.e. import to catalyst to convert into UI components and finally use flash builder to add functionality.