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 export any shape contained in a SWF, including font shapes of embedded fonts, to any format. You can redraw shapes with Actionscript at runtime, or export source code (Actionscript, Objective-C, SVG, etc).
public function ShapeExport() {
var request:URLRequest = new URLRequest("any.swf");
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.BINARY;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(request);
}
private function completeHandler(e:Event):void {
var swf:SWF = new SWF();
swf.loadBytes(URLLoader(e.target).data as ByteArray);
for (var i:uint = 0; i < swf.tags.length; i++) {
var tag:ITag = swf.tags[i];
if (tag is TagDefineShape) {
TagDefineShape(tag).export();
}
}
}