{"id":20763471,"url":"https://github.com/openfl/swf-loader","last_synced_at":"2025-07-11T01:35:24.203Z","repository":{"id":65509445,"uuid":"116870513","full_name":"openfl/swf-loader","owner":"openfl","description":"SWF loader for OpenFL projects built with Webpack","archived":false,"fork":false,"pushed_at":"2025-01-02T17:22:28.000Z","size":21,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-12T08:23:05.774Z","etag":null,"topics":["openfl","swf","webpack-loader"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2018-01-09T21:03:32.000Z","updated_at":"2025-04-25T02:58:23.000Z","dependencies_parsed_at":"2023-09-27T03:21:09.719Z","dependency_job_id":"ed1b4bf9-2ff9-47e1-a08d-c861257851ae","html_url":"https://github.com/openfl/swf-loader","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":"0.47058823529411764","last_synced_commit":"a0e3c218d897814025154efacca678cbc3002d70"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/openfl/swf-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfl","download_url":"https://codeload.github.com/openfl/swf-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfl%2Fswf-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260213609,"owners_count":22975590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["openfl","swf","webpack-loader"],"created_at":"2024-11-17T10:44:19.949Z","updated_at":"2025-07-11T01:35:24.135Z","avatar_url":"https://github.com/openfl.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SWF Loader for Webpack\n\nGenerates an asset library from a _.swf_ file that may be loaded by [OpenFL](https://www.npmjs.com/package/openfl).\n\n# Usage\n\nInstall this _swf-loader_ module into your Webpack project using the following command.\n\n```sh\nnpm install --save-dev swf-loader\n```\n\nThen, in your _webpack.config.js_ file, add the following rule to allow _.swf_ files to be imported using _swf-loader_.\n\n```js\nmodule: {\n\trules: [\n\t\t{ test: /\\.swf$/, loader: 'swf-loader' }\n\t]\n}\n```\n\nFinally, import a _.swf_ file and load it using the `openfl.utils.AssetLibrary` class.\n\n```js\nimport Sprite from \"openfl/display/Sprite\";\nimport AssetLibrary from \"openfl/utils/AssetLibrary\";\nimport myLibraryPath from \"./assets/myLibrary.swf\";\n\nclass MySprite extends Sprite {\n\tconstructor() {\n\t\tsuper();\n\t\tAssetLibrary.loadFromFile(myLibraryPath)\n\t\t\t.onComplete((library) =\u003e {\n\t\t\t\tconst mc = library.getMovieClip(\"MyAnimation\");\n\t\t\t\tthis.addChild(mc);\n\t\t\t})\n\t\t\t.onError(e =\u003e console.error(e));\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfl%2Fswf-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfl%2Fswf-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfl%2Fswf-loader/lists"}