You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2022. It is now read-only.
With as3swf you can generate FXG from SWF Shapes, to reuse those shapes in your Flex 4 projects or with various other Adobe tools.
Example
The following code exports a SWF shape to FXG:
// 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());
This is the FXG of an example rectangular shape with a linear gradient stroke and a radial gradient fill, exported by as3swf: