{"id":20763478,"url":"https://github.com/openfl/swf","last_synced_at":"2026-02-28T06:55:44.517Z","repository":{"id":42695098,"uuid":"214038263","full_name":"openfl/swf","owner":"openfl","description":"Adds support for Flash SWF assets in OpenFL projects","archived":false,"fork":false,"pushed_at":"2026-01-22T23:16:45.000Z","size":4795,"stargazers_count":41,"open_issues_count":18,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-23T16:38:35.633Z","etag":null,"topics":["adobe-flash","flash","haxe","openfl","swf"],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-10-09T22:44:08.000Z","updated_at":"2026-01-22T23:16:49.000Z","dependencies_parsed_at":"2023-02-16T21:01:16.566Z","dependency_job_id":"6b74f8c0-04ad-4c09-b698-5ed27e701ee5","html_url":"https://github.com/openfl/swf","commit_stats":{"total_commits":467,"total_committers":32,"mean_commits":14.59375,"dds":0.4903640256959315,"last_synced_commit":"68eeee552fdefacf0c0b728d6c065dae8efd6b2f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/openfl/swf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfl","download_url":"https://codeload.github.com/openfl/swf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29926994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe-flash","flash","haxe","openfl","swf"],"created_at":"2024-11-17T10:44:21.121Z","updated_at":"2026-02-28T06:55:44.467Z","avatar_url":"https://github.com/openfl.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE.md) [![Haxelib Version](https://img.shields.io/github/tag/openfl/swf.svg?style=flat\u0026label=haxelib)](http://lib.haxe.org/p/swf)\n\nSWF\n===\n\nProvides runtime or compile-time parsing and processing of SWF/SWC assets for use with OpenFL. SWF content can then be used for design or (beta) animation in projects deployed to desktop, web, mobile and console targets in both web and native technologies.\n\nUse of this library for static design content has a track record in production. Use of this library for animation should be considered beta and may not be optimized for performance. Contributions to improve performance are welcome!\n\nThere are three primary code paths within the library:\n\n 1. SWF\n\n Type \"swf\" provides full parsing of the SWF/SWC format (based upon the original as3swf library by Claus Wahlers). This code is optimized primarily for completeness and accuracy rather than performance. Once a SWF has been fully parsed, it can be exported into a new runtime-optimized format (SWFLite, Animate) or there is a rudimentary implemention available for using the parsed SWF content directly at runtime. Those interested in improving this code path may be interested in looking at https://github.com/openfl/openfl-player as a start to testing and improving runtime SWF loading and playback.\n\n 2. SWFLite\n\n Type \"swflite\" is an older exporter format, previously integrated within OpenFL. The code exists in this library primarily for historical reasons. After parsing the SWF content using the \"swf\" code path, a new format was generated with the help of the Haxe serializer. Despite runtime file-size and performance improvements based on the format, the reliance on Haxe serialization had downsides to backward compatibility.\n\n 3. Animate\n\n Type \"animate\" is the latest exporter format, and the default for all targets. It combines the benefits of the \"swflite\" format while writing to JSON and compressing all assets into a single ZIP file. It can be iteratively improved while maintaining backward compatibility. The Macromedia SWF format also has these benefits, however it is optimized for a runtime different from modern web browsers. For example, images in a Macromedia SWF file may have premultiplied alpha applied to bitmaps already. There is no quick way to render this properly using HTML5 canvas. The Animate library format offers an opportunity for to pre-process SWF content into a flexible format optimized for modern production-use.\n\nThis library can be called automatically by the OpenFL/Lime command-line tools to process `\u003clibrary /\u003e` tags, or it can be used on the command-line to process SWF files into Animate ZIP files.\n\n\nUsage\n=====\n\nFirst, make sure that `\u003chaxelib name=\"swf\" /\u003e` has been added to your project.\n\nThen, you can add `\u003clibrary path=\"to/your.swf\" preload=\"true\" /\u003e` to include a SWF library. This will be available at runtime using the file name of the SWF (minus the \".swf\") or you can add `id=\"my-unique-id\"` to specify a custom name.\n\nThere is a (beta) option for `generate=\"true\"` to generate Haxe classes for each \"Export for ActionScript\" type in the SWF file. The `preload` is also optional, but is recommended to simplify use.\n\nYou can create an \"Export for ActionScript\" clip from a SWF like this:\n\n```haxe\nvar clip = Assets.getMovieClip(\"my-swf:MyMovieClipName\");\n```\n\nIf you would prefer to create the whole timeline, use an empty clip name:\n\n```haxe\nvar timeline = Assets.getMovieClip(\"my-swf:\");\n```\n\nIf you use the 'generate' option, you would instead create a new instance like this:\n\n```haxe\nvar clip = new MyMovieClipName();\n```\n\nYou can also process files from the command-line, and load them later:\n\n```bash\nhaxelib run swf process\nhaxelib run swf process path/to/swfs\nhaxelib run swf process test.swf\nhaxelib run swf process test.swf path/to/test.zip\nhaxelib run swf process test.swf output/path\n```\n\nFor example:\n\n```bash\nhaxelib run swf process test.swf\n```\n\nThis will generate a \"test.zip\" file which can be loaded at runtime later:\n\n```haxe\nimport swf.exporters.animate.AnimateLibrary;\nimport openfl.utils.Assets;\n\n...\n\nAnimateLibrary.loadFromFile(\"path/to/test.zip\").onComplete(function(library)\n{\n    var clip = library.getMovieClip(\"MyMovieClipName\");\n    // or\n    Assets.registerLibrary(\"my-swf\", library);\n    var clip = Assets.getMovieClip(\"my-swf:MyMovieClipName\");\n});\n```\n\n\nInstallation\n============\n\nYou can easily install SWF using haxelib:\n\n    haxelib install swf\n\nTo add it to a Lime or OpenFL project, add this to your project file:\n\n    \u003chaxelib name=\"swf\" /\u003e\n\n\nDevelopment Builds\n==================\n\nClone the SWF repository:\n\n    git clone https://github.com/openfl/swf\n\nTell haxelib where your development copy of SWF is installed:\n\n    haxelib dev swf swf\n\nRebuild the SWF library tools:\n\n    ```bash\n    openfl rebuild tools\n    # or\n    cd swf\n    haxe rebuild.hxml\n    ```\n\nTo return to release builds:\n\n    haxelib dev swf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfl%2Fswf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfl%2Fswf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfl%2Fswf/lists"}