Skip to content

Instantly share code, notes, and snippets.

@claus
Created May 3, 2010 21:17
Show Gist options
  • Save claus/388597 to your computer and use it in GitHub Desktop.
Save claus/388597 to your computer and use it in GitHub Desktop.
// Parse the SWF contained in ByteArray ba
var swf:SWF = new SWF(ba);
// Grab a DefineShape tag from the internal dictionary
// We assume here that character ID 1 represents a shape tag
var shape:TagDefineShape = swf.getTagByCharacterId(1) as TagDefineShape;
// Export the shape to FXG
var doc:FXGShapeExporter = new FXGShapeExporter(swf);
shape.export(doc);
// Dump the generated FXG
trace(doc.fxg.toXMLString());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment