1

The ultimate goal is to use JSFL to export a 2D skeleton from Flash. The file will likely consist of one or more Movie Clips which animate some Graphic symbols. I can happily export the child symbols as PNGs and also access the keyframe and tween data. The problem is that I'm not sure how the script can know that the Leg is attached to the Body etc.

This is what I've thought of so far:

[IK/Bones] As far as I can tell, there is unfortunately no API for accessing the IK / Bone features

[Symbol Hierarchy] I don't want to go down the route of grouping all children in a symbol hierarchy as I suspect this will make life hell for my designers.

[Custom Properties] I'm not aware of any easy way to assign custom properties (ID and ParentID) to the graphic library items.

[Flex] A Flex tool panel may be an option, but this seems like overkill and I'm not sure where to start with that.

[Layers] Placing all child layers in a Layer folder right after the parent. This may be my best option as I can get this information in JSFL, but it also seems like a nasty hack.

I'm interested in any thoughts people have on this problem. Thanks.

Aranda
  • 855
  • 8
  • 17

2 Answers2

1

What are you trying to achieve here? I'm not quite certain which advice to give you...

If you "just" want to export animation, you could take a look at this: http://prototyprally.com/introducing-the-grapefrukt-asset-exporter/

[Custom Properties] Yes you can add data to things in the flash IDE. The Docuemnt, Element and Item object all has methods for adding/getting data.

RasmusWL
  • 1,573
  • 13
  • 26
  • Thanks for the answer. I didn't know about the data API so that will be useful. What I'm really trying to do is provide a an exporter to make life easier for designers. So far it can take movie clip and export all the layers' animation data as XML. It can also go through the library and export graphic items as appropriately sized PNGs. Currently the animation data is in world space, but I'd like to know the hierarchy of the layers (similar to boned animation in 3D) so I can export said hierarchy and determine the local space transforms for the animation data. – Aranda Jul 27 '11 at 12:25
0

I'm not sure if this answer is still relevant as almost an entire year has passed, but I did it by parsing the DOMDocument.xml file generated by saving a flash file in the XFL format. You can get the armature data from there with a lot of knowledge of the XFL format. If you run into any problems, I can probably provide some guidance.

alk3ovation
  • 1,202
  • 11
  • 15