If I interpreted your comment correctly, you want to:
Have arbitrarily shaped sprites in Flash and automatically extract the shape of these sprites to use it as collision shapes in Box2d
Usually, collision shapes are much simpler shapes than the graphical asset they represent (performance). A highly detailed 3d Model can be represented just by a chamfered cylinder.
Some physic-bodies can be created automatically by algorithms, but it's also common practice to draw/model them manually. Unless you have a huge amount of different shaped sprites, it's most likely not worthwhile to implement an algorithm that extracts shapes for you.
If you have a look at the following image, you can see that a very complex shape can be represented by some circles and simple polygons (must be convex!). Drawing these shapes manually is (most likely) going to be superior to any algorithm you can come up with.
You could draw these shapes in a vector tool like Illustrator or Inkscape and export them to SVG, which can easily be parsed. Or use Flash and export the shapes as FXG, which is also a format that can easily be parsed.
If I haven't convinced you yet, and you really want to programmatically create the shapes from your sprites, here are two approaches that might work.
- Render the sprite to a bitmap (using BitmapData.draw) and perform vectorization on the alpha-channel. If the resulting shape is concave, triangulate it.
- Use the as3swf library to parse an existing SWF file in flash. You can extract shape-information from there. Your main problem here is going to be: Finding the shape(s) that form the outline of your object. Convert this shape into convex polygons.