{"id":13742828,"url":"https://github.com/zenrobin/FlashMovieClipConverter","last_synced_at":"2025-05-09T00:31:55.551Z","repository":{"id":6151222,"uuid":"7380480","full_name":"zenrobin/FlashMovieClipConverter","owner":"zenrobin","description":"The github home for ShaneSmit's public movieclip converter for Starling","archived":false,"fork":false,"pushed_at":"2013-10-02T15:33:38.000Z","size":168,"stargazers_count":24,"open_issues_count":5,"forks_count":14,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-11-15T13:39:44.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zenrobin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-30T21:18:53.000Z","updated_at":"2022-08-18T15:23:00.000Z","dependencies_parsed_at":"2022-08-31T21:01:29.894Z","dependency_job_id":null,"html_url":"https://github.com/zenrobin/FlashMovieClipConverter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenrobin%2FFlashMovieClipConverter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenrobin%2FFlashMovieClipConverter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenrobin%2FFlashMovieClipConverter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zenrobin%2FFlashMovieClipConverter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zenrobin","download_url":"https://codeload.github.com/zenrobin/FlashMovieClipConverter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171038,"owners_count":21865275,"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":[],"created_at":"2024-08-03T05:00:36.706Z","updated_at":"2025-05-09T00:31:55.177Z","avatar_url":"https://github.com/zenrobin.png","language":"ActionScript","funding_links":[],"categories":["User Interface","Development Tools"],"sub_categories":["Starling"],"readme":"FlashMovieClipConverter\n=======================\n\nThe github home for ShaneSmit's public movieclip converter for Starling.\n\nVersion 1.4 has been downloaded from the Starling Forum and posted here for the community to continue improvements.\n\n**Forum**\nhttp://forum.starling-framework.org/topic/flash-movieclip-converter-preserves-display-list-hierarchy\n\n**Orig code: (posted here)**\nhttp://digitalloom.org/CodeWeaver/FlashMovieClipConverter-1.4.zip\n\n**Shane's origional Post (October, 2012):**\n\n\nI started looking at Starling 2 days ago, and quickly realized a great truth that I'm sure you are all very familiar with: Starling MovieClip != Flash MovieClip.\n\nObviously, we still want to be able to create content and animations with Flash, so the typical solution is to walk through each frame of a Flash MovieClip and create a texture from it. With large and/or long animations this is a terrible waste of GPU memory. And you've lost all the display list hierarchy (if that was important to you).\n\nSo I wrote some code that attempts to really convert a Flash MovieClip to a Starling IAnimatable Sprite. It's many AS files worth of code, so I won't paste it here... but here's the basic psuedocode:\n\nWalk through the Flash MovieClip display list:\n    For each child\n        If it's a container\n            Create a Starling Sprite (IAnimatable if more than 1 frame)\n            Start over, using the new Sprite (recursive)\n        Else\n            Create a Starling Texture from it. (uses CRCs to avoid dups)\nThe code can be found here: http://DigitalLoom.org/CodeWeaver/FlashMovieClipConverter-1.4.zip\nVersion 1.4 - Added command-line AIR app to pre-convert the Flash MovieClip.\nversion 1.3 - Performance enhancements, and added clone() function.\nversion 1.2 - Added typical MovieClip controls (gotoAndStop, etc.)\nversion 1.1 - Added Texture Atlasing\n\nUsage - Run-time conversion:\n\nvar animSprite:ConvertedMovieClip = FlashMovieClipConverter.convert( flashMC );\nStarling.juggler.add( animSprite );\nUsage - Pre-conversion via command-line AIR app\n\n\u003e StarlingConverter [-noSortBitmaps] MyMovieClip.swf\nvar clipData:XML = // Load MyMovieClip-clipData.xml\nvar atlasBitmaps:Vector.\u003cBitmapData\u003e = // Load MyMovieClip-atlas1.png (and atlas2, atlas3, etc.)\nvar animSprite:ConvertedMovieClip = FlashMovieClipImporter.importFromXML( clipData, atlasBitmaps );\nStarling.juggler.add( animSprite );\nThe code is quite limited... it only handles animation of position, rotation, scale, and alpha. But that's 90% of what I usually animate anyway. It was intended to convert Flash MovieClips loaded from SWF files without any AS linkage (as required by iOS), so I can't guarantee it'll work in other situations. Furthermore, I can't spend time supporting it... so if you improve it, just post it back to this thread.\n\nForgive me if someone else has already created something like this. The only thing I was able to find was emibap's Dynamic Texture Atlas Generator, which didn't appear to do what I wanted.\n\n\n**Usage**\n\nFlash Movie Clip Converter - Converts a Flash MovieClip to a Starling IAnimatable\n                             Sprite.\n\nThis code can be used in one of two ways:\n\n1) Convert an in-memory Flash MovieClip object to a ConvertedMovieClip object:\n\nvar animSprite:ConvertedMovieClip = FlashMovieClipConverter.convert( flashMC );\nStarling.juggler.add( animSprite );\n\n2) Export the MovieClip information, then import this data at runtime.\n\n  a) Install 'StarlingConverter.air' by double-clicking it. (Windows or Mac)\n  b) Open up a command prompt ('terminal' on Mac), and navigate to where your\n     .swf file is located.\n  c) Run '/path/to/installed/StarlingConverter MyMovie.swf'. Output files will\n     be placed in the current working directory. (There is no console output)\n  d) Optional: Multiple .swf files can be specified on the single invocation.\n               Use the '-noSortBitmaps' to skip presorting the bitmaps before\n               they are placed in the atlas image.\n  e) Import with the following as3 pseudo-code:\n\nvar clipData:XML = // Load MyMovie-clipData.xml\nvar atlasBitmaps:Vector.\u003cBitmapData\u003e = // Load MyMovie-atlas1.png (and atlas2, atlas3, etc.)\nvar animSprite:ConvertedMovieClip = FlashMovieClipImporter.importFromXML( clipData, atlasBitmaps );\nStarling.juggler.add( animSprite );\n\nFor updates, questions, comments, and rants, see the forum thread at:\nhttp://forum.starling-framework.org/topic/flash-movieclip-converter-preserves-display-list-hierarchy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenrobin%2FFlashMovieClipConverter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzenrobin%2FFlashMovieClipConverter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzenrobin%2FFlashMovieClipConverter/lists"}