0

I have a PNG image, the image features a shape surrounded by a transparent area:

sample image

I want to recreate this image as a path in flex mxml, something like this:

<s:Path data="M 0 0 L 0 100 L 100 100 L 100 0 L 0 0" />

How can I export the path data so that I can use this shape in Flex, is there a program that will do this for me?

zero323
  • 322,348
  • 103
  • 959
  • 935
Drahcir
  • 11,772
  • 24
  • 86
  • 128
  • Illustrator will export to fxg directly. InkScape exports to svg, which easily translates to fxg. – RIAstar Apr 15 '13 at 15:38

2 Answers2

2

Illustrator will export an FXG, as will Photoshop.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • I've just tried doing it with illustrator, but it's not working, it also exports an assets folder and then embeds the image in the FXG. My image is a flat file, but I need to convert it to a path – Drahcir Apr 15 '13 at 15:48
  • Never mind, I have found how to convert it to a path, it's working now. – Drahcir Apr 15 '13 at 16:00
  • 1
    Great; if my suggestion doesn't answer your question; please post a more detailed answer yourself. – JeffryHouser Apr 15 '13 at 16:13
1

My problem was that my original image was a flat file, not a path. This meant that following @www.Flextras.com's answer didn't work for me, the result was an FXG with an image embedded.

The process I used is as follows, I used Adobe Fireworks for this:

1) Magic wand selection

Select the body of the image with magic wand.

Magic Wand Selection

2) Convert to path

Right click -> Modify Marquee -> Convert to Path

Convert To Path

3) Export as FXG

File -> Export

Export As FXG

4) Done

Open the FXG in notepad and extract the path data.

Done

Drahcir
  • 11,772
  • 24
  • 86
  • 128